You imported Evernote .enex files into Bear, maybe the same file twice, and now many notes appear two or more times. People on Bear's community forum describe this: "I must have imported some .enex files twice as I now have many duplicated notes in Bear". A second user there reports the same after an Evernote import. Below is a way to find the copies and remove them without losing anything.
Why duplicates appear after an import
The most common cause is importing the same .enex file more than once. Users report that each run adds a fresh set of notes rather than skipping ones that already exist, so a second import doubles everything. We can't confirm Bear's exact behavior beyond those reports.
Other likely causes:
- A large Evernote export was split into several files, and one notebook ended up in more than one of them.
- An import was interrupted, you ran it again, and the first partial batch stayed in place.
- You imported both a whole-account export and individual notebook exports.
The quickest way to learn which applies is to compare Bear's note count before and after importing a single file.
Step 1: Back up before you delete anything
Deleting can't be undone once you empty the trash, so take two backups first.
- Check that Time Machine (or whatever backup you use) has run recently.
- Export all your notes from Bear as Markdown to a new, empty folder, for example
~/Desktop/bear-export-1. Bear's help documentation has the current export steps for your version. Include attachments if the export dialog offers it. - Keep your original
.enexfiles. They are your fallback.
Step 2: Find exact duplicates by content hash
Two notes with identical text should export as identical files, and identical files have the same hash. The command below lists every group of identical .md files. It only reads files and changes nothing.
Open Terminal and go to the export folder:
cd ~/Desktop/bear-export-1Count the exported files and compare with the note count Bear shows:
find . -type f -name '*.md' | wc -lList the duplicate groups:
find . -type f -name '*.md' -exec shasum -a 256 {} + | awk '{h=substr($0,1,64); f=substr($0,67); n[h]++; list[h]=list[h] "\n " f} END {for (h in n) if (n[h]>1) print n[h] " copies:" list[h] "\n"}'
shasum -a 256 computes a SHA-256 hash for each file, and awk prints only hashes that appear more than once. If nothing prints, no two exported files are byte-identical.
Each group is a set of notes with the same content. Pick the one you keep and write down the titles of the others.
Step 3: Remove the duplicate notes in Bear
- Search Bear for each duplicate title.
- Delete every copy except one. Don't empty Bear's Trash yet.
- Export again to a new folder (
~/Desktop/bear-export-2), then run the Step 2 command there. A clean result prints nothing. - Use your notes for a day or two. Only then empty the trash.
One reply in the Bear thread suggests asking an AI assistant to dedupe by content hash after a backup. That can work, but your note text goes to a third party, so only share a backup you are comfortable sharing. The local command avoids that.
Compare the ways to find duplicates
| Method | Good for | Weak spot |
|---|---|---|
| Sort by title and compare neighbors | A few dozen notes | Slow, and misses copies with different titles |
| Content hash command | Hundreds of notes, exact copies | Misses copies that differ by even one character |
| AI assistant on a backup | Quick triage | Sends note text to a third party |
If the copies are not exact
The hash only matches identical content. If the command prints nothing but you can see duplicates, the two imports probably produced slightly different text, such as a changed tag line or extra whitespace. Sort by title in Bear and compare neighbors by hand.
If the export has fewer files than Bear shows notes, the export is not one file per note, so the command can't see every note. Use the title method instead.
Common problems with this cleanup
| Symptom | Likely cause | Fix |
|---|---|---|
| Command prints nothing, duplicates visible | Copies differ slightly | Compare by title |
| Fewer files than notes in Bear | Export is not one file per note | Use the title method |
| "No such file or directory" | Wrong cd path |
Type cd , then drag the folder from Finder into Terminal |
| Deleted the wrong note | Manual mistake | Restore from Bear's Trash, your export, or Time Machine |
| Duplicates return | Same .enex imported again |
Keep a list of imported files |
Checklist before you empty the trash
- A Time Machine or other backup exists from before the cleanup.
- The first export folder is untouched.
- The hash command on a fresh export prints nothing.
- Each note you care about still exists once in Bear.
- You have used your notes for a day or two.
Avoid the problem next time
Import one .enex file as a test and compare the note count before and after. Then import the rest one at a time, moving each finished file into a "done" folder so you can't import it twice.
If nothing works
Contact Bear support through the app's Help menu or the support page on bear.app. Include:
- Your Bear version and macOS version
- How many
.enexfiles you imported, and whether any ran twice - Note counts before and after the import
- Whether the hash command printed anything
Hi, I imported Evernote .enex files into Bear and now have duplicate notes.
Bear version: [version], macOS: [version].
Notes before import: [n]. After: [n]. I may have imported [file names] twice.
I exported to Markdown and checked content hashes: [n] identical groups / none found.
Is there a supported way to remove duplicates, or to undo one import batch?
Common questions
Can I undo a single import in Bear?
We found no documented way to undo one import batch. That is why the backup and the one-file-at-a-time habit matter.
Why does the hash command find nothing when I see duplicates?
The copies differ by at least one character, such as a tag line or whitespace. Compare by title instead.
Will the duplicates come back?
Only if you import the same .enex file again.
Is it safe to run the command on my real notes?
It only reads the exported copies and prints a list. It deletes and changes nothing.
