< The MacPaw How-tos

How to Find Duplicates on Mac


144K
VIEWS
1.1K
SHARES

How to find and remove duplicate images on Mac

Finding duplicate files on your Mac is like finding a needle in a haystack: takes either superhuman patience, or a metal detector duplicate finder app. In this post, we’ll go over both manual and app-powered ways to remove all the useless copies that waste your disk space.

So, here’s how you can find and delete duplicate files on Mac:

  • Hand-pick the copies using Finder
  • Find them with a Terminal command
  • Use a duplicate file finder app.

There’s a chance you don’t feel like digging through all your folders or messing with the command line in pursuit of duplicates. If that’s the case, skip the first two options and get yourself an app. We recommend Gemini 2: The Duplicate File Finder — it lets you scan your whole disk, review the duplicates, and delete them with a click of a button. Or, if you’re ready to get your hands dirty, there are still the manual options, and we’ll take a closer look at them now.


How to find duplicate files using Finder.

There’s supposedly a trick that makes Finder reveal your duplicates in a list, but we tested it and it didn’t work. Bummer. This means you’ll have to check all your folders for duplicate files one-by-one, so let’s identify which ones to begin with. If you were a duplicate, where would you be? The truth is you can find duplicate files anywhere on your Mac, but most of them sit in these locations:

  1. Your Photos library
  2. Mail Downloads
  3. Your Downloads folder

These folders end up full of duplicate files for different reasons, and you’ll have to approach them differently. Let’s go over each one.

Photos library

Find similar photos in Photos

You move a bunch of new photos onto your Mac, import them into Photos, and start sorting them out. Been there, done that, know all about it. What you probably don’t know is that all of those pics now exist in two copies: one in the initial folder (say, Documents), and one in Home > Pictures > Photos Library. So, if you save photos onto your Mac first, and then import them into Photos, every single pic is duplicated. That’s where gigabytes of your disk space go.

Now, how do you find these duplicate photos and get rid of them? Depends on how much you rely on Photos for viewing and organizing your pics. If you never liked the app anyway and have backups of all pics in other folders, just go ahead and empty the Photos library. Remember two things here, though:

  1. Delete your pics in Photos only when you’re 100% sure there are copies of them in other folders. Would be a shame to lose memorable shots.
  2. When you delete duplicate files in Photos, they are not removed — just moved to a Recently Deleted folder. This means they still exist on your disk, so if your goal is to free up disk space, don’t forget to empty that Recently Deleted folder.

In case you use Photos as your primary app for images, keep in mind that it only displays files stored in Home > Pictures > Photos Library. So, to keep using Photos for your pics, you’ll have to remove those other copies that are stored elsewhere. Here’s how you can find them:

  1. In Photos, open the Photos tab to see all your pics sorted by date.
  2. In Finder, open All My Files to view all your pics in bulk, not in a dozen individual folders.
  3. Sort the files by Date Created, so that your pics in Finder are listed more or less in the order they’re listed in Photos.
  4. Now comes the tedious part. Take a group of pics in Photos, created within the same day — say, April 17, 2015. Go to Finder, spot the 2015 section, and find that identical group of pics (they will be located together, so you just need to look carefully).

Repeat step 4 for all the pictures you have in your Photos library. That way, you’ll find and remove the duplicate photos that are stored in other locations, and keep only the pics in your Photos library.

As you may have guessed, this is going to take a while, especially given that All My Files will include documents, videos, and other files you have, not just your photos. So, to save you a few hours, we suggest you use a duplicate finder app for the job. Gemini 2, for example, easily finds duplicate photos and shows you where each of them is located. It even autoselects the duplicate pics that are stored outside your Photos library, so all you need to do is hit Remove, and they’ll be gone. You can download Gemini 2 for free and see how it works.

Mail Downloads

Here’s a common scenario: a colleague emails you a document, and you open the attachment in Mail to take a look at it. You’re going to need this file, so you download it onto your Mac for safe keeping. No duplicates, nothing to talk about here. Right?

Not exactly. See, the Mail app has quietly downloaded this attachment the moment you opened it, and stashed it in its very own downloads folder. So once again, you now have two copies of the exact same file on your Mac.

The Mail Downloads folder is not what you’d call “intuitively located”: to access it, you need to know where to look. Do the following to find it:

  1. Open Finder.
  2. In the Menu bar, click Go > Go to Folder
  3. Type this address:
    ~/Library/Containers/com.apple.mail/Data/Library/Mail Downloads
    and hit Go.

This will reveal the folder you’re looking for, so open it and look through the contents. In this case, you don’t even have to compare them with the contents of your other folders: everything in here is simply local copies of the attachments you’ve opened. They are downloaded by Mail just so attachments open faster, and Mail can re-download them any time from your emails. So, even if these files don’t have duplicate counterparts somewhere else on your Mac, they’re pretty much useless for you. Make sure there’s nothing you would miss, and empty the folder altogether.

Downloads

Find similar images in your Downloads folder

Unless you set the browser to ask you where to save a file, everything you download is automatically saved to the Downloads folder. Over the time, you can easily forget whether or not you’ve downloaded this PDF or app installer before. When it gets saved automatically, it’s hard to notice the “(1)” in the file name that indicates you already have something like this. So, you just keep downloading the same files again, and they keep piling up in your Downloads folder. How to find duplicate files in there? That’s relatively easy:

  1. Open the Downloads folder.
  2. Select Cover Flow view (this one’s the handiest, because it lets you both sort files by name and preview them).
  3. Sort your files by the Name column and look for groups of files with the same name.
  4. There’s still a chance files with the same name are not duplicates — for example, a few screenshots, creatively named Screenshot, Screenshot (1), and Screenshot (2). So, you’ll want to use the preview to make sure namesake files are actually identical.

The only problem here is that if files have different names (say, one of them was renamed at some point), you won’t detect them just like that. So this way of finding duplicate files in Downloads or any other folder is sort of limited. If you want to remove all duplicate files, whatever they be called, you’ll need a duplicate cleaner like Gemini 2.

See, you can only find the duplicates that have the exact same name, like PlanToRuleTheWorld.pdf and PlanToRuleTheWorld (1).pdf, and that’s how most duplicate finder apps work, too. Gemini 2, however, is a little more sophisticated: it can also detect files that are similar, but not quite the same: have different names, differ visually, etc. This means no duplicate is left behind, even if they tried to lay low and change their identity. You can download Gemini 2 here and see how this feature works, it’s a real space saver. Or, if you’re still determined to beat your duplicates barehanded, try out the second method.


How to find duplicate files with a Terminal command.

Before we dig deeper into this one, make sure you know your way around Mac’s Terminal, because you might mess things up with it. We’ve tested the command below and nothing bad happened, but just be careful what you type into the command line.

So, here’s how you search for duplicate files with Terminal:

  1. Find Terminal in the Utilities folder or using Spotlight search and open it.
  2. Navigate to the folder you want to scan with the cd command. For example, if you want to scan Downloads, type in cd ~/Downloads and hit Enter.
  3. Copy and paste this command: 
    find . -size 20 \! -type d -exec cksum {} \; | sort | tee /tmp/f.tmp | cut -f 1,2 -d ‘ ‘ | uniq -d | grep -hif – /tmp/f.tmp > duplicates.txt
    and hit Enter.

This will create a text file in the folder you’ve specified, with a list of your duplicates inside. But there are two “buts” here: first, Terminal overlooks a lot of duplicates, and second, you’ll still need to find those duplicate files and sift through them to separate the copies from the originals. So, this command is more like a crystal ball: it gives you hints, but you still have to go and do stuff yourself. Which brings us to the third option, where you hardly have to do anything at all.


How it works with a duplicate file finder app.

There’s a ton of duplicate finder tools out there, but we’ll take Gemini 2 as an example, because we’re 100% sure it works. So, let’s say you want to scan all folders on your Mac for duplicates. Here’s what you do:

  1. Open Gemini 2.
  2. Add your Home folder or drag-and-drop it into the app. Hint: in case you don’t know where the Home folder is, just enter your user name in Spotlight search to find it.
  3. Hit Scan for Duplicates.

How to find duplicate photos with app

When the scan is over (which doesn’t take long), you get two options: Review Results and Smart Cleanup.

Smart Cleanup means you’ll automatically delete all duplicate files, and the originals will stay where they are. It’s called smart, because the app knows which files are duplicates and makes sure at least one copy of a file — the original — remains on your Mac.

Delete duplicate images with Smart Cleanup

If you want to make sure you remove the right duplicate files, hit Review Results. This will open a window with all your duplicates listed. You can preview files (even play music and videos), see how they differ, and select them for removal the way you want. When you’re done, hit Remove.

Clean up duplicates with Gemini 2

That’s pretty much it: Gemini 2 will delete duplicate files in your Photos, Downloads, Mail Downloads, iTunes, and all the other locations on your disk. By far, it’s the easiest way to find all duplicates on a Mac. Download Gemini 2 and you’ll see how simple it is.


Hope this helped you get rid of those sneaky duplicate files that clutter up your Mac and waste your valuable disk space. Go ahead and share this post with other Mac people if you found it useful.



Share it! Knowledge is power:
Gemini 2
Need to get rid of duplicate files?
Get Gemini 2.
Free Download