Skip to content

Mac file guides

How to find duplicate files on a Mac

By · Updated · 5 min read

Short answer

macOS has no duplicate finder for ordinary files. For photos, open Photos and choose the Duplicates album in the sidebar, then Merge. For everything else, compare file checksums in Terminal or use a duplicate finder app that matches files by their contents, not their names, and moves the extra copies to the Trash.

What counts as a duplicate?

An exact duplicate has byte-for-byte identical contents, whatever it’s called: “Invoice.pdf” and “Invoice (1).pdf” downloaded twice. A look-alike is a different file of the same picture: a burst shot, an edited copy, a screenshot saved as both PNG and JPEG. Matching names is not enough. Two files can share a name and differ, and two identical files often have different names.

How do I find duplicate photos with the Photos app?

  1. 1Open Photos (macOS 13 Ventura or later).
  2. 2In the sidebar under Utilities, click Duplicates. It only appears once Photos has found some.
  3. 3Review each set, then click Merge. Photos keeps the highest-quality copy and combines their details.
  4. 4Merged copies go to Recently Deleted, where they stay for 30 days.

This only covers pictures inside your Photos library, not images in Finder folders like Desktop or Downloads.

How do I find duplicate files with Terminal?

This hashes every file in Downloads and prints each extra copy (the first copy of each file is left out of the list):

find ~/Downloads -type f -print0 | xargs -0 shasum -a 256 | sort | awk 'seen[$1]++'

Change ~/Downloads to any folder. It only lists files; delete the copies yourself once you’ve checked them. Large folders take a while, because every byte of every file is read.

Can Finder find duplicates?

Not directly. The closest thing is a list view sorted by name or size, where copies such as “Report (1).pdf” sit next to each other, or a Smart Folder (File › New Smart Folder) filtered by kind and size. Both rely on names and sizes, so they miss renamed copies and can flag different files of the same size.

How do I remove duplicates safely?

  • Keep the copy in the folder you actually use, not the one in Downloads.
  • Move copies to the Trash rather than deleting them outright, and empty it a few days later.
  • Don’t de-duplicate inside app libraries (Photos, Music, Lightroom) from Finder; use the app’s own tools.
  • Leave files in ~/Library and inside app bundles alone.

Finding duplicates with Peekaboo

Peekaboo matches exact duplicates by SHA-256, the same check as the Terminal command, and finds look-alike photos with Apple’s Vision framework, all on your Mac. Files are grouped by size first, so scans are fast. It shows how much space the copies are worth, keeps the best copy unless you pick another, and moves the rest to the Trash with one-click undo.

  1. 1Open Duplicates.⇧⌘D
  2. 2Review exact copies and look-alike photos, each with the space you’ll get back.
  3. 3Pick which copy to keep, or let Peekaboo choose.
  4. 4Move the rest to the Trash. Undo the whole session any time.⌘Z

Questions

Does macOS have a built-in duplicate file finder?

Only for photos. The Photos app has a Duplicates album (macOS 13 Ventura and later). For files in Finder folders there is no built-in tool, so use Terminal or a duplicate finder app.

Is it safe to delete duplicate files?

Yes, for exact duplicates, as long as you keep one copy and the files aren’t inside an app’s library or system folder. Moving copies to the Trash first gives you a way back.

Why do I have so many duplicate files?

Downloading the same attachment twice, exporting the same image in two formats, copying folders between drives, and syncing services that make “(1)” copies on conflict are the usual causes.

Does Peekaboo upload my files to find duplicates?

No. Hashing and photo matching both run on your Mac. Peekaboo has no account and no cloud.

Your privacy choices

With your permission, Google Analytics measures visits to this site using cookies. Privacy policy.