Hi Miquel,
Unfortunately I don't have an easy solution for you. There are some things I can point you to that might help, though some are only available in more recent versions, so you may want to consider upgrading first.
First, we have a task in 2.6 that will allow you to move description relations from one authority record to another. This could be used to make sure that all the links to descriptions added to the duplicated authorities are moved to the original authority you want to keep. Also, having no relations at all on the duplicates will then allow us to target them for deletion via script. You will still need to repeat this task for each duplicate. See:
If you are able to run this task, then I have found an older thread in the forum that contains a number of script variations. The latest versions look to be updated for 2.4/2.5 (and should work in 2.6 as well), and will delete any authority records that have no event relationships (i.e. are not linked to descriptions as creators, accumulators, etc). You will need to read the thread carefully as there are several changes and variations shared throughout, so make sure you grab the right version and read the instructions closely. Also, we STRONGLY recommend that you make a backup of your data before continuing, and proceed at your own risk! See:
Right now these are the only tools I can think of that might help you resolve this issue. Otherwise, you will need to do the cleanup manually via the user interface, or else make backups and experiment with SQL yourself. We have some resources that might help you better understand how AtoM's data model is organized. See for example:
- Copies of AtoM's data model as entity relationship diagrams on the wiki: ERDs
- Common AtoM database queries in the documentation - should give you some ideas: docs
- Introductory slides to using SQL in AtoM: slides
Good luck!