How to remove exact duplicate notes from an importing error

I must have imported some .enex files twice as I now have many duplicated notes in Bear.

Is there a best way to identify and remove one instance of duplicated notes? I didn’t find any guidance here in Community.

I have my Claude Pro connected to Bear. Is there code I can develop to find (and delete) exact duplicates?

1 Like

I have this same issue. I’m getting a lot of duplicate files while importing from Evernote. It’s going to be a pain to have to delete them.

You can ask Claude to list your notes and report duplicates based on content hash. If it looks all right, you can ask it to then delete the duplicates and keep one of each set. Or, if you let it access the CLI, it can help you to write a script that does it for you. You might want to be clear about whether you also want to search the archive and trash, and what copy to delete. Or maybe you can use the modified date if they are separate for the imports. It depends on your data.

Remember to take a backup before trying if something goes wrong.