If you’ve been using your Mac for some time now, chances are high that you have accumulated duplicate files without realizing it. Duplicates on Mac are usually identical files of any format, such as documents, music, or images.
While Mac systems offer a good amount of storage, these files slowly take up space on your device, eventually slowing down its performance. So, you need to be smart about dealing with duplicates to avoid experiencing storage limitations on your Mac.
This article explains how to find duplicate files on a Mac and how to remove them. Let's dive in!
In this article you will find the following:
Before we start:
Keeping your MacBook free of duplicate files is easy with MacKeeper's Duplicates Finder, which quickly and easily scans your Mac to remove unnecessary duplicate files.
Here’s how to use it:
- In MacKeeper, select Duplicates Finder from the sidebar
- Click Start Scan, and wait for it to finish
- Select what files you want to delete, and click Remove Selected.
Why does Mac duplicate files?
Your Mac may duplicate files for different reasons. For example, you could download the same file more than once. Similarly, you may have installed the same apps multiple times without realizing it.
Other common reasons for duplicates on your Mac include:
- You have identical libraries and playlists on different devices, which allows copies of files to be stored on your Mac
- Deliberately creating several copies of a document or a photo and forgetting to delete the other ones
- Importing photos or music from external devices, like smartphones, can sometimes create duplicates
- Some applications create duplicate files or system backups within their data folders
- Automated backup or synchronization processes, like Time Machine, can duplicate files across devices or storage locations.
Duplicate files are a huge inconvenience, especially if you’re trying to keep your MacBook organized. That’s why you should find and delete duplicates regularly to free up disk space on your Mac.
To learn more about your files, ensure you get a file path on Mac and establish its folder and disk information. This will also make it easier to delete a file manually if you no longer need it.
Does Mac have a Duplicate File Finder
macOS does not have a dedicated duplicate file finder that automatically checks and removes duplicates from your device. However, there are many ways to search for duplicate files on Mac, such as relying on Smart Folders in the Finder.
Smart Folders helps you easily locate identical files on your device. The tool lets you define criteria for items to be included in the folder, making it easier to keep track of files on your Mac.
Besides Smart Folders, you can also use your MacBook's Quick Look feature to preview files without opening them. This helps you decide whether the files are worth keeping or should be deleted from your Mac.
How to search for duplicate files on Mac
Once your hard drive is loaded with duplicates, your macOS risks becoming excruciatingly slow for regular tasks. The best way to free up disk space on a Mac is to identify these files and get rid of them.
Here are some proven methods to search for and identify duplicate files on Mac:
- Find duplicate files with Smart Folder in Finder
- Identify duplicate files with Terminal
- Search duplicates in the Photos Library
1. Find duplicate files with Smart Folder in Finder
Finder's Smart Folders feature is one of the most straightforward ways to locate duplicate files on your system. Though time-consuming, relying on Smart Folders will help you find duplicates by file size or type without using any third-party tool.
Here’s how to find duplicates with Smart Folders in Finder:
- Open Finder on your Mac.
- Click File in the upper-left menu.
- Select New Smart Folder in the drop-down menu.
- Proceed to the + button and click it.
- You can now decide on criteria to locate duplicate files, whether photos, music, or videos.
Using Smart Folders can be a helpful method for locating duplicates on your Mac based on file attributes. You can rely on the method if you want to:
1.1 Catch out duplicates in specific folders
You can use Smart folders to set specific criteria based on file attributes such as name, extension, creation date, modification date, and more. This makes it easier to find duplicates among files with the same criteria that Smart Folders gather in one place.
Follow these steps to set up a Smart Folder that searches a specific folder:
- Go to Finder > File > New Smart Folder and type the specific folder in the search bar.
- Click ‘+’ in the top-right corner to set the parameters for the files you want in the specific folders. This could be a name, kind, date created, etc.
- Now, open each file with the same name, kind, or those created on the same date in the specific Smart Folder and check whether their data is duplicated.
Hint from our team:
From this point on, you can open and organize your files by name, size, or date created to help you see those that are duplicated. Delete duplicates and drag them to your Trash.
1.2 Find duplicates by file size
Smart Folders will help you identify duplicate files on Mac based on size for easy filtering and subsequent deletion. To get started, create a New Smart Folder and follow these steps to locate duplicates by file size:
- In the search bar, type the folder name where you want to locate duplicates.
- Click ‘+,’ then hit the ‘Name’ drop-down menu, and scroll down to Other, where you can set the search criteria as file size.
- Set it to the ‘Physical file size in bytes’ that matches the range or exact size of the file you want to delete. Click OK.
- After grouping the files by size range, review them to identify duplicates and delete them.
The New Smart Folder will contain all files within the specified or exact size range. You can open this folder, manually scroll through it to identify duplicates, and move them to the trash.
1.3 Look for duplicates by file types
In the same way that it helps you locate duplicates by file size, Smart Folders can also be very useful for finding duplicates of specific file types. Do the following:
- Create a New Smart Folder first—see how above.
- Set specific criteria to filter duplicates or identical files based on their file type or extension. For example, you can specify the criteria for duplicate JPEG image files as .jpg or .docx for Microsoft Word documents.
Despite being quite useful in locating duplicates based on file attributes, using Smart Folders requires much manual effort. Because of this, it's a decent option—but only if you have extra time to clear duplicate files on your Mac individually.
2. Identify duplicate files with Terminal
For tech-savvy Mac users, one method for finding and eliminating duplicates is to use terminal commands. In this method, duplicates are listed by Terminal, but you will still need to find and get rid of them manually.
Using Terminal as a command-line interface to identify duplicate files on a Mac is quicker as long as you know the basic commands and functions. To do it:
- Open Finder and go to Applications.
- Click on Utilities and select Terminal to open it.
- Go to the folder you want to scan using the cd command. For example, if you're going to scan Downloads, type in cd ~/Documents and hit ENTER.
- Copy and paste the command: find ./ -type f -exec md5 {} \; | awk -F '=' '{print $2 "\t" $1}' | sort | tee duplicates. Txt
Hint from us:
This terminal command creates a text file in the folder you’ve specified with all the duplicates inside. Open a Finder window and navigate to the folder. From here, you can open the duplicates.txt file and proceed to sort and delete them manually.
We should also note that some duplicates, especially those with different file names, may not be flagged as such.
Can you rely on Terminal commands to identify duplicates?
The good thing about using Terminal to identify duplicates is that every file has a unique identifier, otherwise known as an MD5 hash. This identifier doesn’t change, even if you move files on Mac to a different folder or rename them.
So, you can still generate a list that displays MD5 tags using the Terminal command described below to verify all duplicates within a specific folder.
Here’s how to create the MD5 tags list:
- Open Terminal.
- If you want to scan the Downloads Folder, type into the Terminal window: cd~/Downloads.
- Copy and paste this code: find ./ -type f -exec md5 {} \; | awk -F '=' '{print $2 "\t" $1}' | sort | tee duplicates.txt and hit ENTER.
- Proceed to open the Finder > Downloads.
- Open the Dupicates.txt file.
You’ll see a list of all the files in the specified folder with the md5 tags, making it easier to tell which files are duplicates. Overall, identifying duplicates with Terminal is quicker than the Smart Folders option.
However, there are a few things to keep in mind:
- Only use Terminal if you understand how Terminal commands work.
- Terminal command tends to overlook most duplicates.
- While it’s quicker, you still have to locate those duplicates and sort them from the original copies.
3. Search duplicate photos in the Photos Library
Mac has a Photos app to help you identify duplicate photos in the photo library. These photos are stored in a designated ‘Duplicates’ album, where you can merge or remove them to clean up your library.
3.1 Using the built-in duplicate search tool on Ventura or Sonoma macOS
The built-in duplicate search tool to identify and remove duplicate photos on Mac works for newer macOS versions such as Ventura and Sonoma.
Here’s how to use the duplicate search tool:
- Open the Photos app on your Mac and click Duplicates in the sidebar.
- Allow for it to scan and find duplicates.
- If there are any, click Merge [x] Similar Items.
- Go to the Recently Deleted album to find and delete the duplicate copies.
How to find duplicate files on an external hard drive on a Mac
External hard drives on Macs serve different purposes. You can use them for backup purposes, such as Time Machine backups, to back up files on your Mac that weren't part of the macOS installation.
You can also use an external hard drive to transfer music, photos, and documents from your MacBook to another. However, as useful as external hard drives may be, frequently using them leads to the eventual accumulation of duplicate files.
Therefore, I always recommend regularly finding duplicate files on these drives and getting rid of them. The best way to find and delete duplicates on an external hard drive on a Mac is to do it manually.
On your Mac, open the external hard drive and drag the duplicate items to the Bin in the Dock. Alternatively, select the duplicate items, then press Command-Delete.
Or, you can use MacKeeper to automate this process through the custom scan option by following the steps below:
- Open MacKeeper.
- Click on Duplicate Finder > Custom Scan in the bottom right corner.
- Add an external folder to scan and click Start Scan.
How to remove duplicate files on Mac
Duplicates consume a lot of valuable space. If left unchecked over time, they fill up your hard drive with unnecessary copies to back up data and other documents, leading to a huge waste of drive space.
Here are three ways to remove duplicate files on Mac:
1. Remove duplicate files using Mac Terminal
Terminal is one of the best ways to remove duplicates from your MacBook. By keying in a Terminal command, you'll find an extensive list of duplicates on your MacBook, which you can filter and manually delete.
The following steps will help you identify and remove duplicates on Mac using Terminal:
- Go to Application > Utilities to open Terminal.
- Type in the command depending on the folder of choice:
- For downloads, type: cd ~/Downloads
- For documents, type: cd ~/Documents
- Hit Enter and then follow through up by entering the following command in Terminal: find ./ -type f -exec md5 {} \; | awk -F '=' '{print $2 "\t" $1}' | sort | tee duplicates.txt
- A .txt file in your destination folder will show all the duplicates in the directory, if there are any.
View the hash codes in the left-hand column to see which files are true duplicates. Then, manually delete them. Empty your Trash afterward to ensure they don't consume any disk space.
2. Delete them manually using Finder
Here, you'll use Finder to search for duplicate files and then manually delete them. While this may not be ideal if you plan on deleting a ton of duplicates, it's effective in clearing your MacBook of duplicates and recovering valuable disk space.
Here are the steps to follow:
- Open Finder.
- Type asterisk * within the search field to search for all files on your drive.
- You can then search through the list to find duplicate files and remove them.
3. Using third-party software
If the methods described above don't prove effective, the easiest solution you have is to use third-party software dedicated to finding and removing duplicates on your Mac. For example, MacKeeper’s Duplicates Finder finds and deletes similar-looking copies without affecting the original copies.
One of the key advantages of using our tool is that your original files stay safe while you enjoy more disk space for the much-needed files. MacKeeper will always notify you if you accidentally select the original file.
- Download MacKeeper and launch the Duplicates Finder.
- Click on Start scan.
- Remove all the duplicates.
Conclusion
Deleting duplicates on your Mac will help you recover the much needed disk space for the files you really need. As described above, the most useful methods you can use to find and remove duplicate files on your Mac are:
- Find duplicate files with Smart Folder in Finder
- Use Terminal Command
- Search duplicates in the Photos Library
From our experience, the fastest way to locate duplicates was by typing the ‘*’ within the search bar in Finder. The only faster and more efficient way is to use MacKeeper’s Duplicates Finder, which offers advanced features that automate the detection and removal of duplicate files without affecting the original files.