How to find duplicate files on a Mac, with Finder, Photos or Terminal

Find duplicate files on a Mac using Finder, the Photos Duplicates album or a read-only Terminal command that compares file contents. Plus the APFS clone catch.

Short answer

For photos, use the Duplicates album in Photos. For other files, compare contents in Terminal: find ~/Documents -type f -size +1M -exec md5 -r {} + | sort, then look for repeated hashes. Finder alone can only match by name and size. Copies made with Finder’s Duplicate on APFS are clones, and deleting them may free no space.

The steps
  1. For photos and videos, open the Duplicates album in Photos and merge them.
  2. For files, search a folder in Finder and sort by size to spot candidates.
  3. Confirm true duplicates by content with a read-only md5 command in Terminal.
  4. Move the extra copies to the Trash, not straight to deletion.
  5. Check the free space afterwards; APFS clones may not free any.

Photos and videos: use Photos

On macOS 13 Ventura and later, Photos finds duplicates for you. Open Photos and look for the Duplicates album in the sidebar (under Utilities on recent versions). Select a group and click Merge: Photos keeps the best copy and its details, and moves the rest to Recently Deleted.

Files: find candidates in Finder

  1. Open the folder in Finder and press Command-F.
  2. Choose to search this folder, add File Size › is greater than › 1 MB.
  3. Switch to List view and sort by Size. Files with the same size and similar names are candidates.

Finder can't tell whether two files really have the same contents, so confirm before deleting.

Confirm by content in Terminal

This command reads every file over 1 MB in a folder, hashes its contents, and prints only files whose contents are identical. It changes nothing:

find ~/Documents -type f -size +1M -exec md5 -r {} + | sort | awk '{h=$1} h==p {if (!s) print prev; print; s=1; next} {p=h; prev=$0; s=0}'

Lines with the same hash at the start are the same file. Replace ~/Documents with any folder. Big folders take a while, because every byte is read.

Let Tidy Mac do this for you

See every part of your storage explained, and clear junk to the Trash with Undo. $9.99 once, 2 Macs.

The APFS clone catch

On APFS, copying a file in Finder (Command-D or Option-drag) makes a clone: both copies share the same blocks on disk until one changes. They look like duplicates and Finder shows both sizes, but deleting one frees little or nothing. That's why removing "duplicates" sometimes doesn't change your free space. Why sizes disagree

Delete safely

Move extra copies to the Trash, keep the one in the folder you actually use, and empty the Trash once you're sure.

Where Tidy Mac fits

Tidy Mac's Find › Duplicates compares file contents on your Mac (nothing is uploaded) and groups identical files, so you choose which copy to keep. Its sizes count APFS clones once, so the space it reports is space you'd really get back. Removed copies go to the Trash with Undo. Pricing

Frequently asked questions

Does macOS have a built-in duplicate finder?

Only for photos: the Duplicates album in Photos (macOS 13 Ventura and later). For other files, use Finder search or a Terminal command, or a dedicated app.

Why didn’t deleting duplicates free any space?

They were probably APFS clones, made by Finder’s Duplicate or a copy on the same disk. Clones share storage, so deleting one frees little. The Trash also keeps the space until you empty it.

Is the Terminal duplicate command safe?

Yes. find, md5, sort and awk only read files and print a list. Nothing is moved or deleted.

Are files with the same name always duplicates?

No. Same name and size is a hint, not proof. Only identical content hashes mean identical files.

Keep reading