Guide
How to find and remove duplicate files on a Mac
Find duplicate files on your Mac, including duplicate photos and songs, and remove the extra copies safely without losing the originals.
Updated 5 min read
Duplicate files pile up quietly: the same download saved twice, photos imported into two folders, exports copied to the Desktop "just in case". Finding them frees space and makes your files easier to manage. Here is how to find duplicates on a Mac, including photos and music, and remove the extra copies without losing anything.
Duplicate photos and videos: use Photos
On macOS Ventura and later, Photos finds duplicates for you:
- Open Photos and look for the Duplicates album in the sidebar, under Utilities.
- Review each pair and click Merge. Photos keeps the highest-quality version and combines the details of both.
- Merged extras go to Recently Deleted, where they stay for 30 days.
Duplicate songs: use Music
In Music, choose File → Library → Show Duplicate Items. Check each pair before you delete one, because live versions and remasters can look like duplicates.
Other files: search by name and size
Finder can't compare file contents, but you can narrow things down:
- Search your Downloads, Desktop and Documents for copies with names like
(1),copyor2. - In list view, sort a folder by Size: files with the same size and similar names are likely duplicates.
- Open both files to make sure they really are the same before deleting one.
Compare contents in Terminal
To list files in a folder that have identical contents, run this (it only reads files):
find ~/Documents -type f -size +1M -exec shasum {} + | sort | awk '{ if ($1 == prev) { if (!shown) print last; print; shown = 1 } else shown = 0; prev = $1; last = $0 }'
Files with identical contents are listed one after another with the same checksum at the start of the line. Change ~/Documents to the folder you want to check.
Where not to remove duplicates
- Inside app bundles, libraries such as Photos and Music, or system folders. Apps expect those copies to be there.
- In code projects,
node_modulesand build folders: copies there are normal. - In folders synced by another app, unless you know how it handles deletions.
Find duplicates by content with Roomy
Roomy's Duplicate Finder compares files by what is inside them, not their names: size first, then the beginning and end of each file, then a full checksum. It ignores hard links, keeps the oldest copy, and moves the extra copies you choose to the Trash.
Frequently asked questions
Does macOS have a built-in duplicate file finder?
Not for files in general. Photos can find and merge duplicate photos and videos in its Duplicates album, and Music can show duplicate songs, but Finder has no duplicate finder.
Are files with the same name duplicates?
Not necessarily. Two files can share a name and contain different things, and true copies often have different names, such as “Report (1).pdf”. Only comparing the contents tells you for sure.
Which copy should I keep?
Usually the oldest copy or the one in the folder you actually use, such as Documents rather than Downloads. Check that nothing links to the copy you remove, for example a project file that points to it.