Recovery & Repair
Data Transfer

How to Find and Remove Duplicate Files Mac OS X

author Carrie Murray
date Friday, August 17, 2018

This post has been updated on August 17, 2018

Duplicate files are one of the reasons that you run out of storage on your iMac or MacBook. You may wonder:

Why are my Mac duplicating files?

Well, there are multiple possibilities:

  • When you move a patch of images into your Mac and view them with Photos app, these photos have two copies: one in the folder that they are moved into, the others are in Photos Library.
  • We usually preview the email attachments before downloading the files. However, once you open an attachment, the Mail app has automatically downloaded a copy of the file. So you get two copies of the attachment if you manually download the file.
  • You download a photo or file twice without noticing it. There will be "(1)" in the file name of the duplicate.
  • You have moved some files to an external drive but forget to delete the original copies.

You can manually find out duplicate files on Mac OS X. However, just think of the time and effort it takes to sort out thousands of duplicates from folder to folder! There must be better ways to find and remove duplicate files all at once.

Here we will introduce to you two easy ways to find duplicate photos, documents, music or video files in your Mac OS X: using Terminal or using duplicate files finder for Mac. You can get tons of free space on your Mac in a few clicks.

Method 1: Find Duplicate Files on Mac with Terminal Command

By using Terminal command, you can detect duplicate files more quickly. However, this method is NOT for those have barely used Terminal before. It might mess up your Mac OS X/macOS if you enter the wrong command. Now, you can follow the steps below to find duplicate files on Mac manually:

Step 1. Open Finder and type terminal to bring out Terminal tool.

Step 2. Choose a folder that you would like to clean duplicates and locate the folder with cd command in Terminal. For example, to search duplicate files in Downloads folder, you can type: cd ~/Downloads and click Enter.

Step 3. Copy the following command in Terminal and hit Enter.

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

Step 4. A txt. file named duplicate will be created in the folder that you have chosen, which lists out duplicate files in the folder. You can find and delete the duplicates manually according to the txt. file.

Find Duplicates with Terminal

But the downsides are:

  • Searching duplicate files with Terminal in Mac is not accurate. Some duplicate files can be found by Terminal command.
  • With the search result provided by Terminal, you still need to manually locate the duplicate files and delete them one by one. It is still not clever enough.

Above is how to remove duplicate files on Mac for free. But if you want to find and remove duplicate files on your Mac all at once, you need the help of a well-designed duplicate files cleaner for Mac. Please check it out in method 2 below!

Method 2: Easily Search and Remove Duplicates with A Duplicate Finder

FonePaw MacMaster (opens new window) is one of the best Mac duplicate finders that you can find. Its Duplicate Finder feature can scan all your Mac folders such as Downloads, Documents, Desktop and detect all duplicate photos, music, apps, documents, videos and more in one click. Besides, you can delete the repeated files with this duplicate file remover.

Duplicate Finder Homepage

The MacMaster duplicate finder is much smarter than you thought:

  • It can detect duplicate files not only by their same name, but also by their size, created date, file type. Therefore, it won't miss out those duplicates with “(1)", “(2)" in the file name.
  • It allows you to preview photos, documents so that you won't delete useful files by mistake. Many people are asking for a best photo duplicate finder on Mac, the FonePaw MacMaster can be your best choice.
  • Better than Gemini, Dupeguru, MacMaster is an all-in-one Mac cleaner that can uninstall apps, clear system caches, junks and more.

To check and clean duplicate file on Mac in one click:

Step 1. Install FonePaw MacMaster on your Mac. It works with macOs 10.14/10.13/10.12 Sierra, Mac OS X 10.11 El Capitan, Mac OS X 10.10 Yosemite, 10.9 Mavericks and more.

Free Download Buy with 20% off

Step 2. Run the application and choose Duplicate Finder.

Step 3. Click Change Path to open a desired folder and click Scan to check all duplicate files on your Mac. It could take several minutes if there are many files.

Detecting Duplicates

Step 4. When the scanning is completed, all duplicates are displayed. You can click the categories on the top side and view the files by photos, music or others. Also, choosing Sort By, you can arrange the files by name, size, date, etc. For example, it works as a duplicate photo finder when you can select "Images" to check the results.

Sort Duplicates By File Types

Step 5. Tick all the duplicate files you want to remove, click Clean to delete them in one click.

It is no doubt that MacMaster is a better choice than Terminal. It can find all the duplicate files and remove extra copies in one click while Terminal is only suitable to techies, and more importantly, it fails to find out all duplicates. So why not download the duplicate files finder app and have a try? If you have any problem when trying to delete duplicate files on hard drive, just leave us a message on the comment box below!