How to find and remove duplicate files on Mac
Duplicate downloads, photos and documents waste space quietly. How to find them on macOS with Finder, Photos, Terminal or an app, and remove them without losing the original.
Short answer
A real duplicate has the same content, not just the same name, so compare files by size and checksum. For your Photos library, use the Duplicates album in Photos. For everything else, use a duplicate finder that compares contents, or a checksum in Terminal. Decide which copy to keep by where it lives, move the others to the Trash, and empty it only after a week or two.
Nobody makes duplicates on purpose. You download an attachment twice, press ⌘D to edit a copy and forget about it, export photos to share and keep the export, unzip an archive and keep the zip, or copy a backup back “just in case”. Each copy is small. Together they can be gigabytes, and they make search worse: three versions of the same contract, and you’re never sure which is the one.
What counts as a duplicate
It helps to separate two cases, because they need different tools and different care:
- Exact duplicates are identical byte for byte, whatever their names.
Contract.pdfandContract (1).pdfdownloaded from the same email are the classic example. Removing one loses nothing. - Similar files look the same but aren’t: a photo and its edited version, the same picture as HEIC and JPG, a resized copy, a document saved twice with one changed word. Removing one can lose something, so a person should decide.
Names prove nothing in either direction. Two different invoices can both be called invoice.pdf, and an identical copy can be called anything.
Spot the obvious copies in Finder
Finder has no duplicate finder, but it can surface the usual suspects. Press ⌘F, choose This Mac, and search for names that contain copy, (1) or (2). Sorting a folder by Size in list view also puts files of the same size next to each other, which is a good hint.
It’s only a hint. Before removing anything, preview both files with Space, or check them properly with a checksum.
Duplicates in the Photos app
If your photos live in the Photos library, use Photos itself. Since macOS Ventura it has a Duplicates album under Utilities in the sidebar. Photos lists exact copies and near-identical ones (different size, format or metadata) and lets you Merge them: it keeps the best-quality version, combines the useful details like captions and keywords, and moves the rest to Recently Deleted.
Never delete files inside the Photos library from Finder. More on photos in how to find duplicate photos on Mac.
Check exact duplicates in Terminal
A checksum is a fingerprint of a file’s contents. Identical files have identical checksums, so listing the matching ones finds exact duplicates regardless of names. This lists groups of identical files over 100 KB in Downloads:
cd ~/Downloads
find . -type f -size +100k -print0 | xargs -0 shasum -a 256 | sort | awk '$1 == h { if (!n++) print "\n" p; print; next } { h = $1; p = $0; n = 0 }'
It only reads and prints; nothing is deleted. The step-by-step Terminal guide explains each part and what to watch out for.
Duplicate finder apps
A good duplicate finder does the checksum work for a whole folder tree and gives you a review screen. There are free options like dupeGuru, paid ones like Gemini 2, and photo-specific ones like PhotoSweeper. Whatever you use, look for these things before you trust it with your files:
- It compares contents, not just names and sizes.
- It shows which copy it will keep and why, and lets you change it.
- It treats similar files differently from identical ones.
- It moves files to the Trash, so you can put them back.
- It stays out of app bundles, libraries and system folders.
Which copy to keep
- The one in the right folder. Keep the copy in Documents or a project folder; remove the one in Downloads or on the Desktop.
- The one with the plain name.
Report.pdfoverReport copy.pdforReport (1).pdf. - The original. Often the oldest one, and the one other apps or documents link to.
Be careful with
- Synced folders. In iCloud Drive, Dropbox or Google Drive, deleting a copy deletes it on every device.
- Project files. Video, music and design projects often reference media by path. Removing the “duplicate” the project uses breaks it.
- Code. Build folders are full of identical files, and they come back with the next build anyway. Leave them.
- Libraries and app bundles. Photos, Music and app packages manage their own contents. Don’t remove files inside them by hand.
Find duplicates with Findy
Findy has a Duplicates view that does the checking and the choosing for you, with you in charge of the last click:
- It finds identical files of 10 KB and more by size first, then by a SHA-256 checksum of their contents.
- It picks the copy to keep with the rules above: not the one in Downloads, not the one called “copy” or “(1)”, the one higher up in your folders, the oldest. Click another copy to keep that one instead.
- Similar photos from a camera or phone have their own section, and they’re not selected until you tick them.
- It skips build output in code projects, apps, and files that are only in iCloud.
- Everything goes to the Trash with an Undo button, and Put Back Last Trashed works later too.
The same groups feed the Duplicates card in Clean Up, which tells you how much space they take before you decide.
Questions
Does macOS have a built-in duplicate finder?
Only in Photos, for the photo library. For files in folders, there’s no built-in tool; Finder can show likely copies by name, and Terminal can compare checksums.
Is it safe to delete duplicate files?
Exact duplicates, yes, as long as you keep one copy and it isn’t a file an app or project points to. Similar files need a look first. Use the Trash so you can undo.
Why do I have so many duplicates?
Mostly double downloads, exported photos, archives kept next to their unpacked folders, and old backups copied back to the Mac.