Find and Delete Duplicate Files

 
Delete Duplicate Files

One more great way to clean Mac from unnecessary files and folders is defining the duplicates. It refers to the clones of music, video files, images, mail downloads and other items. To reclaim precious disk space, it is critical to get rid of the duplicate items after detecting them. A user may purchase a paid third-party solution to check the system for the duplicates.

Below, you will learn how to discover duplicates on Mac as well as erase them to retrieve valuable disk space.

Find Duplicate Files on Mac: Grab the Mouse by Its Tail

The duplicates and other types of junk files are often hidden from the user’s eye. It might be rather time-consuming to search for the possible duplicates manually without having an idea which items exactly were cloned. In any case, a Mac owner needs a tool to show the copied files. Some of the files may look similar or have the same name, but it does not always mean they are useless. Without checking each of the offered duplicates, a user risks erasing critical data without being able to restore it. Thus, the process of detecting the duplicate files and folders is much more complicated than cleaning up space.

It is possible to choose between 3 different ways to find duplicates on Mac:

  • Hand-pick the clones with the help of Finder;
  • Detect the repeated items using Terminal;
  • Use one of the numerous cleaning applications.

The wisest solution is purchasing a third-party cleaning application. The smart software will save plenty of user’s time and nerves. Anyway, if you do not mind digging through all folders, start with Finder.

The formula for finding the clones items on Mac looks this way:

  • Launch Finder.
  • Choose Apple Menu → File → New Smart Folder.
  • Push the “+” button in a top-right corner of the window. Decide on the Search features: Kind, Date, Name, File type, etc.

To include even more parameters and limit the search results, a user may pick Other. Those could be the extensions like .png or .bmp, size, etc. This way a Mac owner can find only the largest movies, for example, or the longest audio tracks.

An advanced user may decide to detect and remove duplicates with Terminal. Those who are looking for the simplest ways should think about installing a special app.

Now, focus on the ways to scan locations that usually contain the greatest amount of clones.

How to Delete Duplicates in iTunes Using Its Built-In Feature

Favorite music may cause problems with the disk space on Mac. People tend to clone songs by accident. Learn how to get rid of the audio duplicates all at once without deleting the songs that you really need.

It is popular to pay for a subscription music service like Spotify – that is why duplicates of audio tracks become less common. Still, many Mac owners go on keeping music libraries that include the items from a variety of sources that are cloning from time to time.

A special feature built-in to iTunes is the first clue. It works this way:

  • Launch iTunes and have a look at Music.
  • Move this direction: File→ Library → Show Duplicate Items.
  • Pick either All or Same Albumin center of the iTunes window. The same track, album, artist, and, what is more important, time reveal a true Feel confident to remove those files.

A long list of clones requires manual deletion. A user can avoid it if there are a few duplicate audios by choosing multiple songs with the ⌘ command and selecting all the copies. Then, it is enough to push the delete key/right-click and pick Delete from Library. Verify the action by selecting Delete Songs.

It is possible to select Keep File to remove it from the iTunes App. However, it will stay on the computer’s hard drive.

How to Delete Duplicate Photos on Mac?

Remove duplicates of pictures on Mac to reclaim plenty of disk space. A double of a huge image takes a meaningful share of space, and when there are numerous clones of the large files, the user risks facing troubles with the computer’s speed and overall performance.

Is Photos your primary application for pictures? Then, it is important to know that it shows items saved in Home -> Pictures -> Photos Library. If you want to go on using Photos, delete the rest of the clones saved in other locations.

  • Launch Photos and go to the Photos tab. All of the images will appear categorized by date.
  • Open All My Files in Finder. This way, it is possible to see all image files without the corresponding folders.
  • Categorize the items by Date Created to have the images listed in the same order as in Photos.
  • Grab a pool of images in Photos that were created on the same date. This way, it is possible to detect exactly the same group of files placed together. After that, a user just needs to move the useless clones to Trash.

Do not forget to erase the selected duplicates from the Recently Deleted folder and Empty Trash to eliminate the items for sure.

Remove Duplicates Using Terminal

After discussing more or less simple ways to find and remove duplicates, it might be interesting to talk about the most difficult way – using Terminal. For the advanced Mac owners with enough experience, using Terminal does not sound scary at all. They prefer this built-in utility to solve many problems with their Apple computers.

A folder by folder search will help not to miss a single duplicate. Make sure you enter every command EXACTLY the way it appears in this article to avoid messing up the operating system!

Step 1. Launch Utilities from Finder. Enter Terminal.

Step 2. Select a folder, which may contain duplicate files and find it using the ‘cd’ command. For instance, to discover duplicates in Downloads, enter cd ~/Downloads. Push Enter once you are done.

Step 3. Insert the given code in a Terminal window and push the Enter button:

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. The system will create a txt. file of the duplicate in the target folder. Detect and remove the identical items manually based on the .txt file.

It is up to the user to separate the clones from the sources. Also, be aware that Terminal is not 100% accurate when searching for the copies so that it may miss some.

OK, done with duplicates now, let’s move on.

Comments