How to Find and Remove Duplicate Files on Mac

find remove duplicate files mac

Having duplicate files scattered across your Mac can take up precious storage space and lead to disorganization. Fortunately, there are several ways to locate and eliminate these redundant files, whether you prefer using the native Finder, Terminal, or a third-party cleaning app like Cleaner One Pro. In this article, we’ll explore three effective methods to help you reclaim disk space and declutter your Mac.

Find and Delete Duplicate Files with Smart Folder

Create a New Smart Folder: In the Finder sidebar, click the “+” icon and select “New Smart Folder.”
Start a new search with Smart Folder

Set Search Criteria: In the search bar, choose “Kind” and set it to “Files.” Then, add another criteria by clicking the “+” button and selecting “File size.” Choose “is equal to” from the dropdown menu and enter “0 bytes” (to exclude empty files).
Use filters to narrow down the search

  • Duplicate Detective: Now comes the clever part. Click the “+” button again and select “Other.” A menu will appear. Scroll down and choose “Duplicate.” This hidden gem instructs the Smart Folder to identify files with the same content, regardless of their names.
  • Refine Your Search (Optional): You can further refine your search by specifying locations (e.g., your Downloads folder) or file types (e.g., images). Click the “+” button and add the desired criteria.
  • Review and Remove: The Smart Folder will display all identified duplicates. Carefully review the files before deleting them to ensure you’re not discarding important copies. To delete, simply select the unwanted duplicates and drag them to the Trash.

Find and Remove Duplicate Files with Terminal

For the technically inclined, the Terminal offers a powerful way to find duplicates using the find command. Here’s a breakdown (caution: proceed with care as incorrect commands can lead to data loss):

  • Open Terminal: Command+Space to launch Spotlight.
  • Change Directory: Type Terminal **to run Terminal Application.
  •  Locate Duplicates: Type **cd ~/Folder Name to navigate to the folder you want to scan. For example, you can type cd ~/Downloads and hit return to move to the Downloads directory.
  • Manual Deletion: Copy and paste the following command lines and hit enter.
    find . ! -type d -exec cksum {} \; | sort | tee /tmp/f.tmp | cut -f 1,2 -d ‘ ‘ | uniq -d | grep -hif – /tmp/f.tmp > duplicates.txt
    The command lines will generate a text file to the folder you’ve specified.
    find duplicate files with command lines
    Note:
    1. The text file only list all the duplicate files path names, so the list might be rather long.
    2. If you want to delete those files, you will need to manually navigate to those files and manually delete them.
    3. Keep in mind that only if you are familiar with the command lines, otherwise you might meet some issues with your Mac.

Delete Duplicates with One Click

Although Smart Folder can be very helpful, it still requires you to have a general picture of what kinds of duplicate files exist on your Mac. However, most of the time, we cannot remember the exact files that have been duplicated. If you want to find and delete duplicate files effectively, it is better to use a third-party app.
Cleaner One Pro is an all-in-one tool for Mac cleaning and performance optimization. The Duplicate Files feature will scan and find duplicate files in your selected folders automatically, saving you time from searching Smart Folder manually.
Scan for duplicate files
After the scan, it offers a preview of the duplicate files so you can check again before deleting.
Preview the contents before deleting duplicate files
With other strong features such as Smart Scan, Junk Files, and real-time monitoring for your CPU and Network usage, Cleaner One Pro will make sure your Mac is always at its best performance.

2 Comments

  1. Meera June 8, 2021
  2. Orest October 5, 2021

Add Comment