How to find duplicate files on your Mac
Two files are duplicates only when their contents match, so compare the contents and don’t rely on the names. Once you have a match, look at where each copy lives before you delete one. A copy may be your backup, or the file another app expects to find in that exact place. On a Mac’s APFS disk you don’t have to delete either one: two identical files can share their storage, so both stay and only one copy’s space is used.
TL;DR
- Short answer. Files are duplicates only when their contents match, so compare contents, not names.
- Watch out for. Before deleting a copy, check where it lives. It may be your backup, or a file another app expects in that exact place.
- With Mint. Mint finds identical files across your home folder and lists them under Optimizable. Optimize keeps every copy where it is and gives back the space the extras took.
Why matching names aren’t enough
Names mislead in both directions. A browser adds a number like (1) to a new download even when it has nothing to do with the first file, and the same photo can sit on your disk under two completely different names. Matching sizes are a better hint.
To be certain, compare checksums. In Terminal, shasum -a 256 followed by two file paths prints a fingerprint for each file, and if the two fingerprints match, the files are identical.
Checking duplicates by hand
Finder can narrow things down before you compare anything.
- Open the folder in Finder, switch to list view and sort by size so files of the same size sit together.
- Compare likely pairs with shasum, or open both if they’re small.
- Decide which copy you use, going by its folder and whether that folder is backed up or synced.
- Move the other copy to the Trash, and open the one you kept to make sure it works.
How Mint handles duplicates
Mint compares file contents across your home folder, and confirms that a pair is identical before it changes anything, so a pair that differs is left alone. The App Store edition looks only in folders you grant and shares documents and media there.
Every exact copy Mint can share goes to Optimizable on the Disk page, and pressing Optimize deletes nothing. Each copy keeps its name, folder and dates, and the copies share one set of storage on disk. Change one later and the other stays as it was. The rows start ticked, since nothing is lost.
A copy Mint can’t share, such as one on another drive or in a folder iCloud syncs, stays in Yours, where you can move it to the Trash yourself. Similar photos that aren’t identical stay in Yours too. Files that live only in iCloud and aren’t downloaded are left out, because checking them would force a download and removing one would free no space on your Mac.
Copies to leave alone
Don’t remove duplicates from inside a Photos library, an app bundle, a Git repository or a backup. Each of those is managed by its own software, and deleting a file from one by hand can break it. Mint’s Optimize skips Photos libraries, Git’s own storage and folders a sync service manages for the same reason. Keep a separate backup of anything you can’t replace, and check the copy you kept before you empty the Trash.
Frequently asked questions
Are files with the same name always duplicates?
No. Two files can share a name and have different contents, so compare them with a checksum or with a tool that reads the contents.
Which copy should I keep?
Keep the one in the folder you work from, especially if that folder is backed up or synced. The modified dates also tell you which copy you last opened and saved.
Does Mint delete duplicates automatically?
No. Mint doesn’t delete exact duplicates at all. Optimize keeps every copy and frees the space the extra copies used, and you can untick any row before you press it. Auto Care can do the same for you while your Mac is idle.
See which copies are taking up space
Run a scan in Mint, open Optimizable and press Optimize. Every copy stays where it is, and the space comes back.