Burrow

How to Find Duplicate Files on a Mac

Name matching finds almost nothing. Content hashing finds the real duplicates, and hardlink awareness stops you deleting the same bytes twice.

Disk space · Jul 24, 2026 · 5 min read

Duplicate files accumulate quietly: the same photo library imported twice, a Downloads folder with three copies of the same installer under three different names, project assets copied between folders. Finding them properly is harder than it sounds, and most of the difficulty is in avoiding false positives.

Why filename matching fails

The obvious approach compares names, which catches "report.pdf" and "report copy.pdf" and misses everything else. The genuinely wasteful duplicates usually have unrelated names, because they arrived from different sources. Meanwhile name matching produces false positives constantly: every project has an index.js and every camera produces IMG_0001.JPG.

Content hashing, done in stages

The correct approach compares content. Doing it naively means hashing every file on the disk, which is slow. The standard optimisation is to filter in stages: group by size first, since files of different sizes cannot be identical, then hash a prefix of each candidate, then hash in full only the ones that still match. On a typical disk this eliminates well over 99 percent of files before any expensive work happens.

The hardlink trap

Two paths can point at the same bytes. Time Machine local snapshots use this heavily, as do pnpm and uv package stores, and macOS itself uses clonefile for copies within APFS. A duplicate finder that is not aware of inodes will report these as duplicates and tell you that deleting one frees space. It does not: the bytes stay until every reference is gone. Worse, it inflates the total it promises you, so the number never matches what you get.

Any tool worth using checks device and inode before calling two paths distinct copies. Burrow's Duplicates tool does the staged content hash and treats hardlinked and cloned files as one, so the reclaimable figure it shows is the figure you actually recover.

Near-duplicates are a separate problem

Photos are the exception where exact matching is not enough. Burst shots and re-exports differ by a few bytes while being visually identical, so content hashing sees them as distinct. That needs perceptual comparison instead, which is what Burrow's Similar Photos tool does, grouping visually near-identical images so you can keep the best frame and drop the rest.

All posts

More reading

Why Your Mac Says the Disk Is Full When It Isn't Giving Claude Code Access to Your Mac's System State What macOS System Data Actually Contains How to Safely Clear Xcode DerivedData and Caches