Duplicate photos, videos, documents and other duplicate files on your Mac can take up storage space and lead to disorganization or even confusion. Getting rid of them helps free up space and improve organization. This article shows you how to find and delete duplicate files on Mac in different ways, each with step-by-step instructions and helpful details.
Free Download macOS 10.11 or later Free Download Windows 11/10/8/7
The easiest way to find duplicate files on Mac is to use duplicate file finder software. Cisdem Duplicate Finder identifies duplicate images, videos, audios, documents, PDFs, archives and all other duplicate files on Mac, including those in folders, Photos/iPhoto and Music/iTunes. In addition to files that are exactly identical (regardless of name), it identifies similar photos.
With this piece of software, you can conveniently preview duplicate files and quickly remove all unwanted duplicates with a single click.
Below are the steps.
1. Install the software.
Download and install Cisdem Duplicate Finder. Open it.
Free Download macOS 10.11 or later
2. Add a location on your Mac to scan for duplicate files.
Click the Add button , select one or multiple folders and click Open.
To find duplicates in Photos or Music, add the Photos library or add the Music Media folder.
3. Customize the settings.
This step is optional. Click the Settings button and customize the settings based on your needs. For example, you can exclude certain files from the scan by specifying a file size range, the folder, or the file extension (such as “png”) and turn on/off the feature to find similar photos.
4. Click Scan.
Click the Scan button on the right to start the scan.
5. View the found duplicate files.
When the scan is complete, the results window will appear, displaying all duplicate files under the All tab. To only view a specific type of duplicate files (like duplicate photos), go to its tab (like Image). There are three view modes .
The built-in preview feature lets you preview images, audios, videos, documents, PDFs and more.
6. Select unwanted duplicates for removal.
In each set of duplicate files, the software has already automatically selected all but one file for elimination.
You can also select or deselect by hand.
In addition, you can use a selection rule. On the left, highlight the sets to which you want to apply a rule by clicking them. Click the List button to choose a rule.
7. Remove duplicate files.
Click the Delete button in the bottom right corner to delete all selected files. Confirm the deletion by clicking Yes in the message that appears.
By default, the deleted files go to Trash.
Terminal, which is included with macOS, provides a command-line interface to macOS. You can use it to do a lot of cool things, such as searching for duplicate files.
This method computes the hash value of every file in the folder you specify and identifies duplicates by comparing hash values. If two or more files have the same hash value, they are a set of duplicate files. The method does a good job of finding files that are exactly the same (regardless of name).
But note that this free method doesn’t help you remove the duplicate files that it finds. You need to do it manually.
Below are the steps.
1. Open Terminal.
Open Launchpad, type Terminal in the search field at the top, and click Terminal. Alternatively, open Finder, go to Applications > Utilities, and click Terminal.
2. Specify the location in which you want to look for duplicate files.
For folders that come with your Mac (like Desktop and Documents), enter something like “cd Desktop” or “cd Documents”, and press Return.
For other folders, say, folder ABC, enter “cd” and a space, open folder ABC in Finder, and drag this folder into Terminal. Press Return.
3. Enter the command and press Return.
grep -hif <(find . \! -type d -exec md5 -r {} \; | sort | tee /tmp/f.tmp | cut -f 1,2 -d ‘ ‘ | uniq -d) /tmp/f.tmp > duplicates.txt
4. Go to the specified location to open duplicates.txt.
The time that Terminal takes to compute and compare hash values depends on the number of files it deals with. When the process is complete, open the file duplicates.txt (which is created by Terminal).
As shown in the screenshot below, in each line, this text file displays the file path on the right and the file hash value on the left. Files are sorted in a way that you can effortlessly spot every set of duplicate files.
5. Move duplicate files to Trash.
Thanks to the file paths provided in the text file, you can locate the duplicate files in Finder. Erase duplicates by moving them to Trash.
Tip: If you want to use Terminal to find a specific type of duplicate files, say, duplicate JPG photos, use the following commend instead in step 3.
grep -hif <(find . \! -type d -iname '*.jpg' -exec md5 -r {} \; | sort | tee /tmp/f.tmp | cut -f 1,2 -d ' ' | uniq -d) /tmp/f.tmp > duplicates.txt
If you are not comfortable with the command-line interface, you can use Finder, a file management app included with macOS. Like Method 2, this method is also free.
Finder can’t find duplicate files, but its Smart Folder feature can help make the manual identification of duplicate files easier and quicker. With this method, it’s recommended to handle only a type of duplicate files (such as duplicate photo files or video files) at a time.
Below are the steps.
1. Open a folder in Finder.
Open Finder by clicking its icon in the Dock. Navigate to the folder of your choice.
2. Start a search.
Start a search in the Finder window with Command-F.
3. Specify the search criteria.
Click the pop-up menu on the left and choose Kind. (If you can’t see Kind, choose Other instead, select Kind, and click OK.) Click the pop-up menu on the right and choose Image. (Specify an image format in the new pop-up menu if needed.) This will display all the images in this folder, including those in subfolders.
4. Choose a view.
In the Finder toolbar, click the Icon view button . (You can use other views like List, Column or Gallery. In my case, the Icon view makes it easy for me to spot duplicate files.)
5. Sort files.
Sort the image files by Size, Name, Kind, Date Created or another attribute. Choose the attribute that makes it the easiest for you to spot duplicates.
6. Compare files to identify duplicates.
Now it’s relatively easy for you to look for duplicate files. Compare files to identify them.
7. Remove duplicates.
Get rid of unnecessary duplicates by moving them to Trash.
As you can see, this method is flexible. You can use it in the way most efficient for you.
Like Method 2 and Method 3, this method is also free. However, it can be less useful because it only works with the duplicates you see in the Music app on Mac.
Below are the steps.
1. Open Music.
Open the Music app. In the sidebar on the left, click Songs. In the View menu, choose All Music instead of Only Downloaded Music.
2. Control-click a column heading.
In the list of attributes that appears, make sure that you choose Album, Artist, Bit Rate, Cloud Download, Cloud Status, Kind and Time.
3. Go to the File menu.
Hold down the Option key and choose Library > Show Exact Duplicate Items. Now, you will only see sets of duplicate songs.
4. Delete duplicate songs.
You need to go through each set and decide which track(s) to keep and which track(s) to delete. You can make the decision based on your needs.
Here’s what I do. First, I download the songs that are not downloaded yet. Next, I compare the songs in each set. I prefer tracks with the higher bit rate or more complete info and tracks that I have “loved” or rated. Finally, I select the duplicate tracks that I don’t need, control-click, and choose Delete from Library.
5. Confirm the deletion.
In the message that appears, click Delete Song(s). In the message that appears, click Move to Trash. This way, the duplicate music files will be deleted and go to Trash.
After you remove duplicate tracks, you can still see them in your Library. Don’t worry. They don’t really exist. You can get rid of them using Smart Playlist.
Tip: In step 3, if you don’t hold down the Option key, you will see the Show Duplicate Items option. Choosing this option will find more duplicates, for example, the same song that appears on a studio album and a live album.
Why do I have duplicate files on my Mac? Well, there can be various reasons. Some behaviors can lead to duplicate files. For example, sometimes you may download or import the same files to your Mac twice more even more without knowing it. Syncing files and backing up files can also create duplicates. If you are not happy with having them on your Mac, this article can definitely help.
The article talks about four ways to find and delete duplicate files on Mac. Three of them are free and built in to your Mac. The first method is the most efficient and effective one. If you are not after efficiency or if there aren’t many files on your device, the second or third method can be a choice.
With a passion for tech and writing, Sarah joined Cisdem, where she focuses on creating articles about using utility tools to enhance file management and simplify contact management.
Joachim Meinold
Exactly what I was looking for, and very detailed instructions. Thank you!
Birgit Walenta
I had lots of useless duplicate files on my mac, and i followed these steps and now they are all gone!!! thank u!