There is a module for removing duplicate nodes, but how to delete duplicate entities (in my case ECK entities) based on title and bundle that are the same?

I was thinking that the search api module might be of help, which I installed. But listing duplicates requires something extra.

I also have Rules installed, but not sure how to create such rule.

What would be a recommended way to do this?

2 Answers 2


I'd look at the Entity Bulk Delete module. This module provides a Drush command that can bulk delete arbitrarily specified entity types.

The caveat here is the module does not delete based on your specified logic of duplicate titles. For that, you can modify its EntityFieldQuery in the _entity_bulk_delete_query() function so it matches your criteria for deletion removal.

  • This will be a bit too complicated or me to create. I will reformulate my question to exclude custom coding.
    – Yuri
    May 13, 2016 at 11:17
  • Essentially, you're asking if some one has created a module that deletes/lists duplicate entities based on a criteria you've not exactly specified (i.e. how do you determine which is the original among duplicates? Oldest/Newest?); it might exist, there's the Remove Duplicates module but it's just for nodes.
    – Shawn Conn
    May 13, 2016 at 12:51

Eventually I created an aggregated view with counted title field, and filters on the bundle.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.