While most Macs have a decent amount of storage space, it’s not unlimited. So, you have to be smart about what you’re saving. And duplicate files are only a waste of space. But finding and deleting those duplicates requires an extreme amount of patience or an app that will find those duplicates for you.

Keep reading and you’ll learn how to clean your Mac of duplicates both with an app and manually. The methods you’ll be reading about include:

Duplicate file finder appThe easiest way to get rid of duplicate files due to being fully automatic that also guarantees finding all duplicates.
Terminal commandsThe method for tech-savvy Mac users. Terminal lists all or most duplicates, but you will then have to locate and remove them manually.
Smart folder in FinderBased on built-in features of the Finder, it is the most cumbersome method because it involves opening every file before removing it.
The Photos appTwo different methods for different macOS versions: manual removal for older macOS versions and using a built-in feature for Ventura and Sonoma.
Mail Downloads folderUsing the Finder to access the folder where all Mail Downloads are stored to locate and remove unnecessary files you may have downloaded several times.

Why is my Mac duplicating files?

There are a ton of reasons why your Mac could be loaded with duplicate files. Maybe you’ve imported the same photos from your camera multiple times and didn’t realize it. Or you couldn’t find a file you were sent, so you just re-downloaded it. Another common reason for being flooded with duplicates is having identical libraries and playlists on different devices, so all of these copies are stored on your Mac. You may have also deliberately created several copies of a document or a photo and forgot to delete them. Regardless of the reason, duplicates are a normal part of using a computer, which is why you should regularly check and clean your Mac for duplicate files.

How to find duplicate files on Mac

Over time, your Mac is going to fill up and run out of storage space. And most likely, duplicates will take up a good amount of your valuable space. Sure, you can try to sort through all of your files, searching for those duplicate documents, photos, and music files. But if your hard drive is already full, that means you’ve got a lot of files to sift through. And it’s going to take you a very long time to go through them one-by-one. Either way, learn how to remove duplicates automatically or manually with our easy-to-follow tips.

1. Delete duplicate files with CleanMyMac

There are a ton of duplicate finder tools out there, but we’ll take CleanMyMac as an example because we’re 100% sure it works. Once you have CleanMyMac downloaded and installed, just follow these steps to scan all of the folders on your Mac:

  1. Download, install, and open CleanMyMac.
  2. Go to My Clutter from the sidebar.
  3. Click Scan. You can choose the location for the scan if you want to. By default, your home folder is selected.
myclutter info

When the scan is over, which doesn’t take long, click Review All Files > Duplicates. You can now review duplicates CleanMyMac has found and click Remove to get rid of them.

my clutter duplicates

That’s pretty much all there is to it. CleanMyMac will find duplicate pictures, archives, folders, music, and other files. It’s by far, the easiest and fastest way to find and delete all of the duplicates on your Mac. Note that some files may be sent to the Recently Deleted folder of the app (like Photos), so you will have to empty it to ensure the complete removal.

2. Find duplicate files with a Terminal

Before you jump into Terminal headfirst, you should only do it if you’re comfortable and know your way around Terminal. It’s a powerful tool that can mess up a lot if you don’t know what you’re doing. We’ve tested the steps below, and nothing bad happened, but you should still be careful and double check everything you type into the command line.

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

  1. In Finder, go to Applications > Utilities > Terminal to 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 Return.
  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 Return.

This will create a text file in the folder you’ve specified, with a list of your duplicates inside. But there are two things you should keep in mind:

  • This Terminal command overlooks a lot of duplicates.
  • You’ll still need to locate 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 the sorting and deleting manually. Which brings us to another option, that will do a little more of the work for you.

Sometimes files won’t be flagged as duplicates because they have slightly different file names. But every file has what’s called an md5 hash, which is a unique identifier that stays with the file. So even if you move or rename a file, it’s md5 hash will remain the same.

Similar to the Terminal command above, you can generate a list that shows the md5 tag to verify all of the duplicates in a particular folder. Follow the steps below to create that list.

  1. Open Terminal from the Utilities folder.
  2. For this example, we’ll scan the Documents folder. Type into the Terminal window: ~/Documents
  3. Copy and paste this code: find ./ -type f -exec md5 {} \; | awk -F '=' '{print $2 "\t" $1}' | sort | tee duplicates.txt and then hit Return.
  4. Then, open a Finder window and navigate to your Documents folder.
  5. Open the Documents.txt file.

This generates a list of all of the files in the folder you’ve specified, but you’ll at least be able to see the md5 tags to know which files are copies of each other.

3. Find duplicate files on Mac using Smart folders

The truth is that duplicate files can live anywhere on your hard drive, which makes finding them that much trickier. But thanks to a feature in Finder called Smart Folders, you can narrow your search down based on specific criteria. Say, you want to search all of the documents on your Mac, then you’d follow these steps:

  1. In a new Finder window, click File > New Smart Folder and make sure This Mac is selected.
  2. In the top-right corner, click +.
  3. From the first drop-down menu, select Kind and in the second drop-down, choose Documents. Then, click Save.
  4. A pop-up window will come up, letting you name the folder and choose where to save the Smart Folder.
  5. From there, you can see all of your documents. Click to order the files by either name, size, or date created to help you quickly spot duplicates.
  6. Select the files you want to delete.
  7. Right-click (or hold down Command and click) and then click Move to Trash.

While using Smart Folders is a lot faster than hunting through your entire hard drive for duplicate files, it still requires a bit of patience. Manually going through each of your files one-by-one can take some time, even after you’ve narrowed them down. So, it’s better to focus on specific folders, file types, or file sizes. 

How to find duplicate files in specific folders

To set up a Smart Folder that searches a specific folder, follow these steps:

  1. Go to the folder you want to search in Finder and click File > New Smart Folder.
  2. In the Search bar at the top of the window, click the folder name.
  3. Click + in the top-right corner.
  4. Set your other search criteria and click Save.
  5. Then, name your Smart Folder and choose where to save it.
  6. Organize your files by name, size, or date created to help you see the duplicates.
  7. Select the files you want to delete and drag them to your Trash.

How to find duplicates of specific file types

Because you set the search criteria with each Smart Folder, that means you can search for specific types of files or files of a certain size. Here’s how:

  1. Click File > New Smart Folder.
  2. Then, in the top-right corner, click +.
  3. From the first drop-down menu, select Kind. 
  4. Choose Image from the second drop-down. You can also select an extension.
  5. Click Save.
  6. Then, give your Smart Folder a name and choose where you want to save it.
  7. After it’s saved, you can select the duplicate files, right-click or command-click, and click Move to Trash.

How to find duplicates by file sizes

If you want to only search for files by their size, which is particularly helpful to get rid of larger duplicates, do the following:

  1. Open a Finder window.
  2. In the top right, click +.
  3. Click on the first drop-down to choose File Size. If you don’t see it, click Other… and then search for size, to add it to the menu.
  4. Set your file size criteria.
  5. Then you can click Save, name your folder and choose where it’s saved.
  6. Once your Smart Folder is created, you can select the duplicates, right-click or command-click, and then click Move to Trash.

While Smart Folders are extremely helpful in finding and deleting duplicates on your Mac, it still requires you do a lot of it manually. Which leaves room for error and not to mention how much time it will take you to remove files one at a time.

4. Find duplicate pictures in your Photos library

You move a bunch of new photos onto your Mac, import them into Photos, and start sorting them out. 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, the best thing to do is to use the import features in the Photos app.

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:

  • Delete your pics in Photos only when you’re 100% sure you have copies of them in another folder.
  • When you delete duplicate files in Photos, they are not removed — just moved to a Recently Deleted folder. Meaning they’re still taking up storage space. So, don’t forget to empty your Recently Deleted folder, too.

Find similar photos in Photos

If you are using Photos to store and organize your pictures, keep in mind that it only displays files stored in Home > Pictures > Photos Library. So, if your pics are duplicated, you’ll have to remove the 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.

Tip:

You’ll quickly see how long it will take you to find and delete your photos manually. But if you use an app like CleanMyMac, it can do most of the heavy lifting for you. Plus, you’re able to review all of the duplicates it finds and remove them with a click. The best part is you can download CleanMyMac for free and see how it works.



Use a built-in duplicate finder

If you’ve already updated your Mac to a newer macOS version — say, Ventura or Sonoma — you’ll be pleased to find out that the Photos app comes with a built-in tool for finding duplicates. Here’s how to use it:

  1. Open the Photos app and click Duplicates in the sidebar. 
  2. Click Merge [x] Items > Merge [x] Exact copies. 
  3. Go to the Recently Deleted album and delete the copies.

Note that if you cannot see the Duplicates album in the Photos app, you may need to quit it and open it again later. The thing is that the system needs some time to analyze your photo library and find exact duplicates. Make sure that your Mac is connected to the power source during this time. Then, the album appears automatically.

5. How to find duplicates in 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, now you have two copies of the same file on your Mac.

The Mail Downloads folder is not particularly easy to find. You really have to know where to look to get to it. Follow these steps to access it:

  1. Open Finder.
  2. In the Menu bar, click Go > Go to Folder…
  3. Type this path:

~/Library/Containers/com.apple.mail/Data/Library/Mail Downloads and hit Return.

This will open a new Finder window where all of your Mail attachments live. The good news here is that there’s nothing to compare or sort. These files are automatically downloaded to make it faster to open the next time you need them. But all the attachments still live on your email server and can be re-downloaded at any time. Meaning, if there’s nothing you would miss, you could empty this entire folder.

Best duplicate cleaner apps for Mac

The alternative to searching for duplicates manually is to use a duplicate finder app. They scan your Mac, looking for duplicate files of different types, and let you delete them with just a few clicks. Using them is a good idea to ensure that you have enough storage.

Here are some apps to consider: 

  • CleanMyMac — the app we already introduced in the article
  • dupeGuru
  • Duplicate Sweeper

If you want to learn more about these apps and some other alternatives, check out this article.

Hopefully, this article helps you clean up your Mac and remove those sneaky duplicate files that are eating up all of your storage space.