Skip to content
← All guides

Check storage

How to Find and Delete Duplicate Files on a Mac

The MacZentra team · Updated Oct 1, 2026 · 6 min read

Duplicate files, the same download saved twice, a project copied "just in case", exports that never got cleaned up, quietly add up to gigabytes. The safe way to find them is by content, not by name: two files are only true duplicates when their bytes match exactly, so you can delete one copy knowing the other is identical.

Why "same name" isn't good enough

Matching on filename alone is risky in both directions. Two unrelated files can share a name (IMG_0001.jpg from two different cameras), and two identical files can have different names (report.pdf and report copy.pdf). The only way to be sure a copy is safe to delete is to compare the actual contents.

How content-based duplicate detection works

Reading every byte of every file would be painfully slow on a large disk, so good tools stage the work from cheap checks to expensive ones, and only fully read files that survive each stage:

StageCheckWhat it eliminates
1. SizeGroup files by exact byte sizeA file with a unique size can't have a twin, discarded immediately.
2. Head hashHash only the first few KBSame-size files that differ in their opening bytes (most large media).
3. Probe hashHash head + middle + tail of large survivorsBig files that match at the start but differ later (VM disks, databases).
4. Full hashFull BLAKE3 of what's leftConfirms byte-for-byte identity. Only true duplicates remain.

A file is only ever called a duplicate when it shares both an exact size and an exact full hash with another. That staging is why a scan of hundreds of thousands of files finishes quickly instead of reading the whole disk.

Finding duplicates by hand

A quick Terminal pass

You can approximate the above with a checksum. This hashes every file under a folder and lists any hash that appears more than once:

Terminal
# Hash every file, then show only the duplicated hashes
find ~/Downloads -type f -exec shasum -a 256 {} + \
| sort | uniq -w64 -D

It works, but it reads every byte of every file (no size pre-filter), so it's slow on large folders and offers no safe way to pick which copy to keep. Treat it as a spot check, not a cleanup plan.

Skip build folders

If you develop, a whole-disk duplicate scan will drown in build-artifact "duplicates" from node_modules, .git, build and target. Those are reinstallable, not something you'd hand-delete one by one. Exclude them so the results are files you actually chose to keep. For those folders specifically, see cleaning up node_modules.

MacZentra Duplicates screen
Duplicates groups exact copies so you keep one and trash the rest.

What about files that are nearly the same?

Exact matching won't catch a document re-exported with a tiny change, or a photo resized on the way out of an app. Those need fuzzy matching: by filename for documents, or perceptual hashing for images. See finding duplicate and similar photos for the image case.

Everything MacZentra can clean

Treemap and Sunburst disk maps, a duplicate finder, Developer Junk, a complete app uninstaller and more, in one native storage cleaner for Mac that’s 15.4 MB.

Explore all features →