How to find and delete duplicate files on a Mac
Updated
Finder has no feature for finding files with identical contents. The Photos app gathers duplicate photos and videos from your library in a Duplicates collection and can merge them, but it does not look at ordinary files in folders or on external drives.
Haemil Explorer's "Find Duplicate Files" compares only files of the same size, checks their contents with SHA-256, and lists the groups that free the most space first. You keep one file per group, move the rest to the Trash, and can undo with ⌘Z. It is a Pro feature, and you can try it free for the first 14 days.
What Finder and Photos can do
In Finder you can only sort by name or size and compare by eye. Files with different names but the same contents are hard to spot.
Photos collects duplicate photos and videos from your library in a Duplicates collection in the sidebar. Merging keeps one item and moves the others to Recently Deleted, where you can recover them for 30 days (Apple support page "Remove duplicate photos and videos on Mac").
Find files with the same contents, whatever their names
- Choose "Find Duplicate Files" from the ⋯ menu, or right-click a folder or disk and choose "Find Duplicate Files".
- A new tab opens and starts searching with the default settings.
- If you need to, change Minimum size (1MB by default), Type (Pictures, Videos, Music, Documents, Archives) or Include hidden files in the top bar, then click Scan.
Haemil first reads file information only and groups files of the same size. For those files it compares the first and last 64KB, and if those match, it compares the whole file with SHA-256. Files with different names or dates land in the same group when their bytes are identical.
Groups that free the most space come first. Each group shows its size, file count and the space you can free. Each file shows its folder and dates, and photos and videos get a thumbnail.
In the developer's own measurement on a debug build, a folder of 480,000 files took 14.0 seconds and turned up 2,112 groups with 17.3GB to free.
Check two external drives together
- Right-click the first drive and choose "Find Duplicate Files".
- Click "+ Add Folder" in the top bar and add the second drive or folder. Click × to remove a location.
- Click Scan. Identical files split across the two drives show up in the same group.
Choosing which copy to keep
In the Select menu, "Keep One in Each Group" checks every file except the one you keep: Newest File, Oldest File, File with the Shortest Path, or File in a Folder I Choose. Groups with no file in the chosen folder are left alone.
When cleaning up a backup drive, pick your original folder with "File in a Folder I Choose…". The originals stay and the copies elsewhere get checked.
You can also adjust the checkboxes one by one. Double-click a file to see it in its folder, then go back to return to the same results and selection without searching again.
Deleting safely
"Move to Trash" tells you how many files and how much space before it moves anything. The files go to the Trash, and ⌘Z puts them back.
If you have checked every file in a group, Haemil does not move them and shows you that group instead. This stops you from removing the last copy by mistake.
Hard links count as one file, so they do not show up as duplicates. Symbolic links are not followed, and packages such as apps and the Photos library are not opened.
Files that are only in iCloud are neither read nor downloaded, and Haemil tells you how many it skipped. Without Full Disk Access it skips protected folders.
What it does not find
Haemil finds only files whose bytes are identical. Similar photos, such as two shots of the same scene, a resized copy or the same picture saved in another format, are not matched.
The default minimum size is 1MB, so smaller files are left out. Set Minimum size to 0 to include small documents.
Finder, Photos and Haemil side by side
| Finder | Photos | Haemil Explorer | |
|---|---|---|---|
| What it checks | No such feature | Photos and videos in the library | All files in the folders and drives you pick |
| Several drives at once | No such feature | Not applicable | + Add Folder |
| Where removed files go | Not applicable | Recently Deleted (30 days) | Trash, undo with ⌘Z |
| Free or Pro | Not applicable | Included in macOS | Pro (free for the first 14 days) |
FAQ
Does it find similar photos?
No. It finds only files whose bytes are identical. Similar shots and resized copies count as different files.
Does it find duplicates inside the Photos library?
The Photos library is a package, and Haemil does not look inside packages. Use the Duplicates collection in Photos for those.
Does scanning change any files?
No. Scanning only reads. Files move only when you click "Move to Trash".