How to Find and Remove Duplicate Files Mac OS X

By Carrie Murray, Monday, October 16, 2017

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

Why is 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.

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. 

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.

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.

Easily Search and Remove Duplicates with A Duplicate Finder

FonePaw MacMaster is one of the best duplicate files 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. 

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.

  • 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.12 Sierra, Mac OS X 10.11 El Capitan, Mac OS X 10.10 Yosemite, 10.9 Mavericks and more. 

Mac Version Download

Step 2. Run the application and choose Duplicate Finder

Step 3. Click Choose 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 View By and view the files by photos, music or others. Also, choosing Sort By, you can arrange the files by size, date, etc. 

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.  

0  likes

Thank you for providing feedback!