Skip to main content
Duplicates

How to find duplicate files across multiple drives on a Mac

A photo that sits once on each of three external hard drives looks unique on every one of them. A check that reads one drive at a time never flags it, so the drives have to be compared against each other.

Written by SupaDupa Published

To find duplicate files across multiple drives on a Mac, plug the drives in at the same time and compare them as one collection. Copies that sit on different drives are invisible to a check that reads one drive and then the next, because it finds the copies inside each drive and nothing between them. The IMG_4412.jpg on your backup drive and the IMG_4412.jpg on your old laptop’s drive never meet.

How the same files end up on several drives

Nobody fills three drives with the same files on purpose. It happens one reasonable step at a time:

  • You copied your laptop’s Documents folder to a drive before you sold the laptop, then copied it again to the next drive.
  • You imported a camera card onto one drive, and later onto a bigger one.
  • You moved everything from a full drive onto a new one and kept the old drive, just in case.
  • You backed up the backup, so the safe copy got its own safe copy.

Each copy came from a different moment and a good reason. That’s why they sit on different drives, and why nothing looks wrong until a drive is full.

Why checking one drive at a time misses them

A check for duplicate files compares the files inside the place you point it at. Point it at Photo Backup and it finds the copies inside Photo Backup. A file that appears once on Photo Backup and once on Old MacBook Drive looks unique to both checks.

The copies between drives are also the big ones. They’re whole folders copied in one go, like Photos 2019 copied onto every new drive you bought. To catch them, every drive has to be in the same comparison.

Finder can’t make that comparison. It shows names, dates and sizes, and it never looks inside a file, so IMG_4412.jpg and wedding-ceremony-14.jpg can be the same photo without Finder noticing. That takes Terminal, or a duplicate file finder for Mac that reads all the drives together.

Not every duplicate is a mistake

A copy of your photos on a second drive might be your backup, and a backup is a duplicate you meant to keep. Before you delete anything, give each drive a job.

  • Pick a main drive. The newest one, the biggest one, or the one you back up. The files you’re keeping live here.
  • Name your backups. A drive that holds a deliberate second copy of the main drive stays as it is. Copies between the main drive and a backup aren’t waste.
  • Mark the drives you’re retiring. Copies on these are the ones to clear, once you know the same file is safe on the main drive.
  • Leave Time Machine drives out of it. Time Machine manages its own backups, and the copies in them are meant to be there.

Get every drive ready to compare

Every drive needs to be plugged in and readable before you compare anything.

  1. Plug them all in. If your Mac doesn’t have enough ports, a powered USB hub gives you more.
  2. Check each drive’s format. Select the drive in the Finder sidebar and choose File > Get Info. The Format line tells you what you have.
  3. Know what the format allows. APFS, Mac OS Extended, exFAT and FAT drives open fully. NTFS, the usual Windows format, opens for reading only. You can find duplicates on an NTFS drive and copy files off it, but your Mac can’t move its files to the Trash without extra software.

Find duplicate files across drives with Terminal

macOS can compare drives for free from Terminal. This command reads every file on the drives you name and prints each set of identical files. It deletes nothing. Open Terminal from Applications > Utilities, paste the command, and press Return.

find "/Volumes/Photo Backup" "/Volumes/Old MacBook Drive" -type f ! -name '.DS_Store' ! -name '._*' -exec shasum {} + 2>/dev/null | sort | awk '{ hash=$1; sub(/^[^ ]+ +/, ""); group[hash]=group[hash] "\n  " $0; n[hash]++ } END { for (h in n) if (n[h] > 1) print "duplicate set:" group[h] }'

Replace the two names in quotes with your drives’ names as they appear in the Finder sidebar, and add a third or fourth drive the same way. Every set prints with full paths, so you can see which drive holds each copy:

duplicate set:
  /Volumes/Photo Backup/2019/IMG_4412.jpg
  /Volumes/Old MacBook Drive/Pictures/wedding-ceremony-14.jpg

What to know before you rely on it:

  • It reads every file in full. On large drives that takes a while, so start it and leave it running.
  • The two ! -name parts skip hidden files macOS writes onto drives, which would otherwise fill the list with tiny matches.
  • It only matches identical contents. An edited or re-exported copy of a photo is a different file, and it won’t appear.
  • The deleting is yours to do by hand, with no thumbnails to check against and no list of which copy to keep.

If you’re merging the drives into one

If the goal is one new drive in place of three old ones, there are two orders that work.

Compare first, copy second

  • Plug in every old drive
  • Find the duplicates across them and clear them
  • Copy what's left onto the new drive

Best when the new drive is tight on room

Copy first, compare second

  • Copy each old drive into its own folder on the new drive
  • Name the folders after the drives they came from
  • Find the duplicates on the new drive alone

Best when you'd rather plug in one drive later

Both orders end with one drive and no duplicates. The difference is what has to be plugged in, and when.

Either way, keep the old drives until you’ve opened a sample of files from the new one. A copy that finished with an error is easy to miss, and the old drive still has the files it skipped.

If one of the old drives is very old, how to get data off an old hard drive covers adapters, formats and what to do when a drive won’t show up.

Using SupaDupa across several drives

SupaDupa is a Mac app that compares the drives and shows you every group of copies before anything moves.

  1. Connect each drive in SupaDupa and scan it. The scan reads the drive and changes nothing on it.
  2. Clear the folder selection. Open the folder menu and click the selected drive again. With no single drive picked, the Duplicates tab reads All Folders and compares every drive you’ve connected.
  3. Click Detect Duplicates, with every drive still plugged in.
  4. Check each group before you trash. Every copy shows its path, so you can see which drive it’s on.

What to expect from the results:

  • One file in every group is marked Keep. SupaDupa prefers a name without a copy marker, so IMG_4412.jpg over IMG_4412 copy.jpg or IMG_4412 (1).jpg, then the older file. It won’t trash that one. Every other copy starts ticked. Untick any copy on a drive you’re keeping as a backup. When the Keep file sits on a drive you’re retiring, untick that group and handle the file in Finder yourself.
  • The Kind filter narrows the list by type: images, video, audio, documents or archives.
  • Copies go to the macOS Trash, and a drive has to be plugged in for its copies to go. There’s no undo button for trashing in the app. The Trash is where you restore a file from.
  • Search keeps working after you unplug a drive, so you can check what’s on a drive that’s back in the drawer.
  • Leave Photos libraries to the Photos app. If a drive holds a Photos Library.photoslibrary, don’t trash anything inside it from SupaDupa. The Photos app manages those files, and its Duplicates collection handles the copies inside the library.

Finding and trashing exact duplicates is free, on as many folders and drives as you want, with no file limit. Pro is $49 once, with a year of updates included. It finds look-alike photos, moves files into the folders SupaDupa suggests, cleans up file names, writes tags to Finder, and names folders from what’s inside them. For the photos on these drives, how to store photos on an external hard drive covers keeping one working copy and treating every other drive as its backup.

Before you trash anything

  • Back up the main drive first. Time Machine or a second copy, whichever you trust.
  • Keep every drive plugged in until you’re done. A drive that disconnects partway leaves the job half finished.
  • Open a few of the kept files from different folders and check that they open.
  • Empty the Trash last. The copies you trash keep using storage on their drive until you empty it.

Common questions

How do I find duplicate files across multiple drives on a Mac?
To find duplicate files across multiple drives on a Mac, plug every drive in at the same time and compare them as one collection. In Terminal, a single find and shasum command can read two or more drives and print each set of identical files with its full path. A duplicate file finder app that can check all of your connected drives together does the same job with thumbnails and a Trash button.
Can Finder find duplicate files on two drives?
Finder can't find duplicate files on two drives, because it shows names, dates and sizes and never compares what's inside a file. Two files with different names can be the same photo, and two files with the same size can be different. Comparing drives needs Terminal or an app that reads the files themselves.
Is it okay to delete all duplicate files?
Deleting every duplicate file is a mistake when one of the copies is your backup. A copy on a second drive that you keep for safety is a duplicate you meant to have. Decide which drive is your main one and which drives are backups first, then clear the copies inside each drive and on the drives you're retiring.
How do I merge two external hard drives without duplicates?
To merge two external hard drives without duplicates, either compare the two drives and clear the copies before you move anything, or copy both drives into separate folders on a new drive and find the duplicates there. The first order copies less. The second needs room for everything at once, but afterwards only the new drive has to be plugged in.
Can a Mac delete duplicates on an NTFS drive?
A Mac can find duplicates on an NTFS drive but can't delete them without extra software. macOS opens NTFS, the usual Windows format, for reading only, so files on it can be compared and copied off but can't be moved to the Trash. Drives formatted exFAT, FAT, APFS or Mac OS Extended work both ways.
Do all the drives have to be plugged in at once?
All the drives you want to compare should be plugged in at once, because a duplicate check reads the files on each one. With SupaDupa, search keeps working on a drive after you unplug it, but checking for duplicates and moving copies to the Trash need the drive connected.
Is there a free way to find duplicates across drives?
There are two free ways to find duplicates across drives on a Mac. In Terminal, one find and shasum command prints every set of identical files on the drives you name. SupaDupa's free version finds exact duplicates across every folder and drive you connect and moves the copies to the Trash, with no file limit.

Keep reading

Storage

How to free up disk space on a Mac

Your Mac already shows what's filling it up. Learn what's safe to clear, what macOS clears on its own, and where forgotten copies are taking up space.

Old drives

How to get data off an old hard drive with a Mac

Connect an old hard drive to a Mac, copy the files off before anything else, and know when to stop. Adapters, drive formats and what to do if it won't show up.