How to find duplicate files on a Mac, and which copies are safe to delete

How to find duplicate files on a Mac: built-in ways for photos, songs and folders, and which copies are safe to delete.

A magnifying glass over two matching photos and two matching documents beside a laptop.

macOS has no single duplicate finder, so use the tool that fits where the copies live. Photos and Music find their own duplicates. For other folders, sort in Finder and check before you delete.

The quick answer

Work in this order, easiest and safest first:

  1. Merge duplicate photos in Photos. Safe.
  2. Clear exact duplicates in Music. Check first.
  3. Check Downloads and your other folders. Check first.
  4. Skip apps, Library folders and the Photos library file. Leave alone.

Before you delete, read why a matching name or size isn’t proof and why deleting a duplicate can free little space.

Is there a duplicate file finder built into a Mac?

For photos and music, yes. For other files, no.

  • Photos lists duplicates in its sidebar, on macOS Ventura 13 and later.
  • Music has two duplicate views in its File menu.
  • Finder has File > Duplicate, but that makes a copy. It doesn’t find copies.
  • Storage settings shows large files and downloads. Apple’s guide to it lists no tool for duplicates.

Find and remove duplicate photos on a Mac

Safe. Photos finds duplicate photos and videos by itself. Merging keeps one item from each set, and you can recover the rest for 30 days. Apple’s guide to removing duplicates in Photos has the details.

Steps for macOS Tahoe 26 and macOS 27:

  1. Open Photos.
  2. Click Duplicates below Utilities in the sidebar. Not there? Hold the pointer over Utilities and click the arrow.
  3. Select the items in one row or several. Command-A selects them all. Using iCloud Shared Photo Library? First choose Both Libraries from the Library pop-up menu in the toolbar.
  4. Click Merge [number] Items, then click it again in the dialog.

One item stays. The others move to Recently Deleted. With iCloud Photos, removed items go from all your devices.

Older macOS versions, Shared Library and what merging keeps
  • macOS Sequoia 15. Click the arrow next to Utilities, then click Duplicates. Then click Merge [number] Items.
  • macOS Sonoma 14. Duplicates is an album in the sidebar, and the button reads Merge [number] Duplicates.
  • iCloud Shared Photo Library. Click the Library pop-up menu in the toolbar and choose Both Libraries first. Duplicates merged between your Personal and Shared libraries always appear in the Shared Library.
  • Which copy stays. Apple’s guide doesn’t say which copy is kept.
  • Two kinds of duplicate. On macOS Tahoe 26, Photos describes exact copies that may have different metadata (details stored with the photo, such as date and place), and photos that look the same but may differ in resolution, file format or other small ways. It says merging keeps one version that combines the relevant data and, for look-alikes, the highest quality.
  • Photos outside the library. Photos only checks its own library. Pictures in ordinary folders, such as an image sent by AirDrop, count under Documents in Storage settings. Treat them as files and use the Finder method below.

Delete duplicate photos for good

Merged copies stay in Recently Deleted for 30 days, then they’re deleted for good. Until then, select them there and click Recover to get them back.

Recently Deleted on macOS Sequoia 15

Click Recently Deleted in the sidebar; on macOS 15.3 or earlier it can be under Utilities.

Find duplicate songs in Music

Check first. Music has two duplicate views, and only one shows true duplicates.

  1. Open Music, click Songs in the sidebar and select a song.
  2. Hold Option and choose File > Library > Show Exact Duplicate Items. Song, artist, album and version must all match.
  3. Select the copy you don’t want, press Delete, then click Delete Song.
  4. Keep File removes it from your library but leaves the file on disk. Move to Trash sends the file to the Trash, removed when you next empty it.
  5. Click Done in the bottom-right corner.
The plain duplicate view, and other details

These steps are the same on macOS Sequoia 15, macOS Tahoe 26 and macOS 27. If you get neither choice in step 4, the song was removed at once; Apple says you can add and download it from Apple Music again. Instead of Done, you can choose File > Library > Show All Items.

File > Library > Show Duplicate Items, without Option, lists every instance of a song by the same artist. So an album track and the same song on a soundtrack both appear. For true duplicates, use the exact view in step 2.

Find duplicate files in Finder folders

Check first. These are your own files, and macOS doesn’t know which copy you meant to keep.

Why a matching name or size isn’t proof

  • Name. Two different files can share a name, and a true copy can have another. On macOS Tahoe 26, Finder adds “copy” to the name of a duplicate it makes.
  • Size. Two different files can be exactly the same size.
  • Content. Files are duplicates only when what’s inside them matches. A checksum tests that: a short fingerprint worked out from a file’s contents.
A magnifying glass held between two documents that look alike
Fig. 1Two files are only duplicates when their contents match, not just their names or sizes.

Shortlist and remove copies in Finder

Finder can’t confirm a duplicate, but it shows you where to look.

  1. Open the folder. For Downloads, choose Go > Downloads.
  2. Click the List View button in the toolbar, then click the Name or Size column header to sort.
  3. Look for neighbors with the same size, or names that differ only by “copy”.
  4. Press the Space bar to preview a file with Quick Look. For a sure match, use the Terminal check below.
  5. Keep the copy in the folder where you’d look for it. Drag the other to the Trash, or press Command-Delete.
  6. Changed your mind? In the Trash, select it and choose File > Put Back. That works until the Trash is emptied.
  7. Empty the Trash when you’re sure. The space isn’t freed until you do.
A trash can with a small calendar beside it
Fig. 2Spare copies wait in the Trash, and Put Back works until you empty it. iCloud Drive’s Trash empties itself after 30 days.
Getting iCloud Drive files back

A change to iCloud data on one device shows up on the others. Files deleted from iCloud Drive in the last 30 days can be recovered at iCloud.com, but not ones you permanently removed.

Prefer Terminal? List identical files

Open Terminal, the Mac’s built-in app for typing commands, from the Utilities folder in Applications. Paste this and press Return:

find ~/Downloads -type f -size +1M \
  -not -path '*/Library/*' -not -path '*.photoslibrary/*' -not -path '*.app/*' \
  -exec shasum -a 256 {} + 2>/dev/null |
  sort |
  awk '{ n[$1]++; line[NR] = $0; hash[NR] = $1 }
       END { for (i = 1; i <= NR; i++) if (n[hash[i]] > 1) { if (hash[i] != last) print ""; print line[i]; last = hash[i] } }'

It only reads. Nothing is deleted or moved, and the list appears only in the Terminal window. It prints groups of files separated by blank lines; every file in a group has the same contents. No output means it found none.

  • find ~/Downloads -type f -size +1M lists every file larger than 1 MB in Downloads and the folders inside it. Change ~/Downloads to another folder, such as ~/Documents. Put a name with a space in quotes, as in ~/"Old Mac". Lower +1M to include smaller files.
  • The -not -path parts skip anything inside a Library folder, a Photos library or an app, which are places not to look.
  • shasum -a 256 reads each file and prints its SHA-256 checksum, 64 characters long, then its path. 2>/dev/null hides messages about folders Terminal can’t read.
  • sort puts matching checksums next to each other, and awk prints only the lines whose checksum appears more than once.

What to expect:

  • It can download cloud files. With Store in iCloud on, a Mac keeps only recent files in full, and reading a file that’s only in the cloud fetches its contents. On a nearly full disk, keep the command out of iCloud Drive and other synced folders, which can include Desktop and Documents.
  • It can take minutes. Every file is read from start to finish.
  • macOS may ask for permission. Apps need your consent to reach Documents, Downloads and Desktop. If you refuse, the command prints nothing. Change the answer in System Settings > Privacy & Security > Files & Folders.
Double-check one pair in Terminal

cmp compares two files byte by byte:

cmp FIRST_FILE SECOND_FILE && echo Identical

Replace FIRST_FILE and SECOND_FILE by dragging each file from Finder into the Terminal window, which enters its full path. If the files are the same, it prints Identical. If they differ, cmp reports the first difference. It changes nothing.

Looking in Storage settings instead

Storage settings has a similar list for big files: in System Settings > General > Storage, click the Info button next to Documents, then Large Files or Downloads. Look there, but delete in Finder. On macOS Tahoe 26, Storage settings warns that an item will be deleted immediately and that you can’t undo it. There’s more in finding large files on a Mac.

Why deleting a duplicate can free little space

Check first. On a Mac’s own disk, a duplicate doesn’t always cost what its size says.

  • A copy made on the same disk may be a clone: a copy that takes no extra space and shares storage with the original. Deleting it leaves the shared data in place.
  • Files that arrived separately each take their own space. The same file downloaded twice is the common case.
  • A copy on another disk is a full copy. See formatting an external drive.

So measure. In Finder, choose View > Show Status Bar to see the available space. Delete the copies, empty the Trash and look again. How to check storage on a Mac explains those numbers.

How clones work
  • Macs use APFS, the disk format modern Macs use. It’s the default on macOS High Sierra and later, and it supports clones.
  • Clones share what hasn’t changed. Later changes are stored separately, and the two files keep sharing the blocks that haven’t changed.
  • Clones can be made automatically. Apple says the copy methods apps can use to copy files automatically create a clone on an APFS volume (a part of a disk that shows up as its own disk).
  • macOS keeps track. For each file, it counts the bytes that would be freed right away if it were deleted, separately from bytes held by a clone or snapshot (a read-only copy of your disk at one moment).
  • Which Finder copies are clones? The Apple pages here don’t say, so assume any of them can be.
  • No automatic merging. Apple’s APFS guide, now retired, says the file system doesn’t deduplicate data.
  • Other disks. Clones are made on the same volume. A drive in another format, such as Mac OS Extended, stores every copy in full.
  • The Terminal command can’t tell which case you have.

Where not to look for duplicates

Leave alone. Matches can turn up in all of these. None of them is clutter.

  • Inside apps. Deleting a file inside an app alters it.
  • Library folders. Apps keep files here that can contain your data.
  • The Photos library file. Changing it in Finder can delete or corrupt it.
  • System folders. Leave /System and /private/var to macOS.
  • Backups. A backup is a second copy on purpose.
Why each one is off limits
  • Apps are signed to show they haven’t been altered since they were built.
  • Application Support, inside Library, holds files apps create and manage for you.
  • The Photos library file. Apple warns that changing a photo library’s contents in Finder can delete or corrupt it. Use Duplicates in Photos instead.
  • The system part of the disk. By default, no process can write to it, not even Apple’s own.

Duplicate finder apps for Mac

If you’d rather not use Terminal, two open source apps do the comparing in a window:

  • dupeGuru finds duplicates by file name or contents, and has a Picture mode for similar pictures.
  • Krokiet, from the Czkawka project, finds duplicates by file name, size or hash, and has a separate tool for similar images.

With any duplicate finder, keep it out of the places above and don’t count on the listed sizes. For apps that map the whole disk, see eight disk cleaners for Mac. For everything else that fills a disk, see how to free up space on a Mac.

More about these two apps

Each is described here from its project’s own pages.

  • dupeGuru. Its site describes a tool that finds duplicate files by scanning either file names or contents, with a Picture mode for pictures that are similar but not exactly the same. The site lists a download for macOS 10.12 or later, and the code is published under the GPL. Its quick start says to verify every duplicate before you remove anything.
  • Krokiet. The Czkawka project describes Krokiet, its current app, as free and open source with no ads, and lists macOS among its platforms. Its feature list says Czkawka has no access to the internet and collects no user information or statistics.

Where duplicates pile up, at a glance

Where How to find them What deleting does
Photos library Photos > Duplicates, under Utilities Keeps one item. The rest wait in Recently Deleted for 30 days.
Music library Option + File > Library > Show Exact Duplicate Items Keep File leaves the file. Move to Trash deletes it when you empty the Trash.
Downloads, Documents, other folders Finder sorted by name or size, then the Terminal check Goes to the Trash. Put Back works until you empty it. A shared copy frees little.
iCloud Drive The same checks. Reading cloud-only files can download them. Removed on every device. Its Trash empties after 30 days.
Apps, Library, Photos library file, system folders None. Don’t look here. Can break an app or library. Leave alone.
Sources and how we checked