How to Delete Duplicate Files on PC in Windows 10/11, macOS?

  author
Written By Tej Pratap Shukla
Anuraag Singh
Approved By Anuraag Singh  
Published On April 1st, 2024
Reading Time 16 Minutes Reading

Summary: Generally, while working with a lot of files, you might come across duplicates of similar files. These occupy unnecessary disk space on your PC resulting in slowing down the system performance. Considering such a scenario, we have brought this article on “How to delete duplicate files on PC (Windows 10/11 & Mac)/ External Hard drive/ Flash drive?”

In simple words, these identical files are copies of the pre-existing files on your Windows operating system. Here, the files can be of different types such as photos, videos, audio, archives, documents, etc. Next, the basic action from your side is to reclaim the drive space and optimize the PC’s efficiency by erasing duplicate files. The possible ways to do so are through Manual sorting, built-in tools of Windows & Mac, and using 3rd party products.

Table of Contents Hide

How to Find and Remove Duplicate Files on PC (Windows 10/11 & Mac) in Simple Steps?

  • Download and launch the SysTools similar files finder.
  • Open folder using Add Folder tab.
  • Configure the scanning options. Then, hit on Continue.
  • Next, click on Delete to erase duplicate files on Windows 10/11 & Mac.

Why Remove Duplicate Files?

Read the section given below to find the reasons to erase duplicate files on PC (Mac & Windows 10/11):

  • Eliminating redundant files on your PC can free up the disk space.
  • The overall efficiency and responsiveness of the system are improved.
  • It makes it easier to manage and organize files.
  • Prevents confusion and errors while handling multiple files.
  • Reduces the backup duration by removing the duplicates.
  • Save time and effort in file retrieval and management tasks.
  • Maintains data integrity by stopping the passage to overwrite files.

Windows 11/10/8/7 Solutions to Clean up Redundant Files

How to Find and Delete Duplicate Files on PC/ Flash drive/ External drive for Free? Using File Explorer

Before answering the above question, let’s first go through the most sought query i.e. does Windows 10 have a duplicate file finder? The straight response will be NO. But, you can make one. Let’s see, to get started, apply the following steps to eliminate similar files on Windows 11 or 10:

  • In the search bar of the window, type the .ext command. Here, replace the .ext file extension with a duplicate file type (e.g., .jpg, .docx, .pdf, .txt, .pptx, etc). Then, press the Enter button.
  • Now, the results will be displayed as per the entered file extension. Next, you can sort the results by their name, size, or date to find out the duplicates.
  • At last, you have to manually review the duplicate files one by one and delete them accordingly.

Here are some of the common files and their corresponding file extensions.

files types

Note: Like other web pages, we have not listed the Indexing Options here. Because Windows Indexing is only done to facilitate faster file searches. But, as per our experience, the File Explorer can also significantly speed up the process by using the pre-built index. So, there is no need to go for the Indexing Options.

How to Remove Duplicate Files on PC/ External Hard Drive/ Flash Drive? Via Powershell – Free  Way

Follow the steps given below to get rid of duplicate files from your Windows 11 & 10 using Windows Powershell:

  • Press ‘Win + x’ and go to Windows PowerShell (Admin).

open powershell

  • Copy and paste the code listed below to find identical files based on their MD5 hash value:

Get-FileHash -Algorithm MD5 -Path C:\Path\To\Your\Folder\* | Group-Object -Property Hash | Where-Object { $_.Count -gt 1 } | ForEach-Object { $_.Group }

Remember to replace the folder path ‘C:\Path\To\Your\Folder\’ with the path of the folder you want to perform the search either it is local disk C drive, Flash drive or external hard drive.

  • Now, PowerShell will list the duplicates with their MD5 hash value. Next, you decide to choose the files you want to delete.
  • After that, if you wish to remove the selected files, you can use the script mentioned below:

Get-FileHash -Algorithm MD5 -Path C:\Path\To\Your\Folder\* | Group-Object -Property Hash | Where-Object { $_.Count -gt 1 } | ForEach-Object { $_.Group | Select-Object -Skip 1 | Remove-Item -Force }

The resulting state will be left with one instance of each duplicate set and erase the rest.

How to Get Rid of Duplicate Files on PC Windows 11/10 for Free by CMD?

Use this approach, only the above approaches fail. Because the process could be a little techie in itself and also to implement. With this being said, let’s get into the method:

  • Open the Run dialog box using ‘Win + R’.
  • Type ‘cmd’ and Enter to open the Command Prompt.
  • Next, use the ‘cd’ to navigate to the folder where you want to perform the scan.

Use the following command in your prompt to get the results:

for /f “tokens=*” %a in (‘dir /b /s /a-d ^| sort’) do @(

if not defined prevfile (

set “prevfile=%a”

) else if exist “%a” (

fc /b “%prevfile%” “%a” >nul

if not errorlevel 1 (

echo Deleting: “%a”

del “%a” /f /q

) else (

set “prevfile=%a”

)

)

)

Make sure to run the above code on a small folder of files to get the precise output. Before going to the large collection of data. Also, ensure to have a copy of a similar data set.

Issues in the Free Solution to Delete Duplicate Files

Given below we have listed only the major limitations of the manual methods to find and delete duplicate files shown above:

  • Time-Consuming
  • Limited Search Criteria
  • No Automated Deletion
  • Risk of Missing Duplicates
  • Complexity for Non-Technical Users
  • Limited File Attribute Comparison – Uses only MD5 hash comparison
  • Inability to Handle Metadata
  • No Undo Option
  • Lack of Versioning
  • Risk of Deleting Needed Files
  • No Centralized Reporting

Instant Solution on How to Delete Duplicate Files on PC Windows 10/11

To manage the above manual or free solutions, we have an alternative i.e. a quick, effective, and trustworthy approach. Using the SysTools duplicate file finder can be beneficial in removing all the duplicate files on the PC. Further, through its powerful scanning engine, you can delete all the clogged-up redundant files, speeding up your computer performance. Let’s see some of the standout features of this proficient utility:

  • Smart Scanning Mechanism
  • Recursive Scanning Option
  • Move or Delete Duplicates
  • Scan more than 70 file types
  • Detects Exact Similar Images
  • Frees up External hard drive/ C drive/ Flash drive/ others
  • Protects and Secures User Data
  • One-time purchase for Lifetime

You can Perform the Scan using the Try Version!

Salient Steps to Find and Remove Duplicate Files on Windows 11/10/8/7:

Step 1. Download and launch the Duplicate file remover software.

Tool main view

Step 2. Then, click on Add Folder to open the folder you want either it is in your PC (local drive C or D) or External Hard drive or Flash drive.

tap on Add Folder

Step 3. Check the radio button in the Scan Configuration as per your requirement. Also, select the file type (.docx, .xlsx, .txt, .pptx, etc.) under the “Select from file extension in folder.” Tap on Continue.

pick the scanning configuration

Step 4. Next, to erase the duplicate files, hit on Delete tab.

tap on Delete tab to delete duplicate files on PC

Step 5. Once the process is completed. The Action tag will change to “Deleted.”

results will be display

Manual Roadmap to Identify and Clean up Duplicate Files on Mac

How to Delete Duplicate Files on Mac / External Hard drive/ Flash drive Using Finder?

In this segment, we will be discussing the manual method to find and eliminate duplicate files using the Finder method. This approach focuses on visually examining the file names, sizes, and content.

Key Considerations:

  • Time-consuming for large folders.
  • Carefully verify files before deleting them.
  • Sorting options in Finder help in the identification process.
  • Permanently delete files by emptying the Trash.

A Step-by-Step Framework:

  • Open the Finder by clicking on the Finder icon or pressing cmd + N.
  • Browser to the folder where the suspected duplicate files are available. Here, the folder can be present in your PC drive or external hard drive or flash drive.
  • Next, tap the “View” menu in the menu bar at the top of the screen.
  • After that, choose “Show View Options” or press Command + J.
  • In the View Options panel, go to “Sort by” → “Name” and close the window.
  • Now, find the files with similar names or other parameters.
  • Then, pick the duplicate files by holding down the Command key and clicking on each identical.
  • Right-click on the Dock → “Move to Trash.”
  • Don’t forget to empty the bin, right-click on the Trash icon, and select  “Empty Trash.”

Note: Cross-check the files before deleting them so that you may not remove important data. The best practice is to take a backup of files before performing any operation.

How to Eliminate Identical Files on macOS / External Hard / Flash Drive Using Terminal?

In this unit, we will be gaining insights on how to use the Terminal to find and delete duplicate files on Mac. In general, Terminal is an advanced and script-based application to detect and get rid of duplicate files.

Key Considerations:

  • Requires familiarity with Terminal commands.
  • Use caution with the rm command to avoid accidental deletions.
  • Customize the command based on the file type.

A Step-by-Step Framework:

Open Spotlight Search by Command + Space and type “Terminal.” Then, hit Enter to open the Terminal.

Use the cd command to navigate to the folder where the duplicate files are present. For instance:

cd /path/to/your/folder

Replace “/path/to/your/folder” with the actual path of the folder. Remember, the folder is not necessary to be placed in your system. Otherwise, it can be on your external hard drive, flash drive, USB, etc.

Copy the command given below to find the duplicate files based on their MD5 checksums:

find . -type f -exec md5 -r {} + | sort | uniq -w 32 -dD

By using this command, the system will calculate the files MD5 checksums, sort them, and display the results only containing the duplicate files.

Review the displayed output to confirm the selection.

Next, use the rm command cautiously to delete duplicate files permanently. For Example:

rm /path/to/duplicate/file

Replace “/path/to/duplicate/file” with the original path of the duplicate file.

Besides this, you can use the following find and xargs commands to scan and clean up the duplicates of a specific extension. Remember to replace the “[file_extension]” with the actual file extension.

find . -name "*.[file_extension]" -exec md5 -r {} + | sort | uniq -w 32 -dD | cut -d ' ' -f 3- | xargs rm

How to Get Rid of Duplicate Files on Mac / Flash Drive Through Smart Folders?

Smart Folders available in Finder are mainly used to create dynamic folders based on your search criteria. Further, this approach simplifies the detection of identical data using visual cues.

Key Considerations:

  • Set precise search criteria to narrow down results.
  • Sorting options aid in the identification process.
  • Drag and drop files from Smart Folder to Trash.

A Step-by-Step Framework:

  • Launch the Finder window. In the Finder menu, go to “File” → “New Smart Folder.”
  • On the Smart Folder window, you will see a search bar in the top right corner. Then, click on the  “+” button adjacent to add search criteria.
  • Pick the criteria that can help in identifying duplicate files. Here are some of the criteria “Name,” “Date Modified,” or “Kind.”
  • Let’s take an example: To find duplicate images, you can use the “Kind” criteria and others are self-explanatory.
  • Next, sort the files by clicking on the column headers (e.g. Name, Date Modified) to arrange the files in a proper order. Now, visually examine the files and choose the files by holding the “Command” key and clicking on each file. Then, right-click and go to “Move to Trash” or drag them to the Trash icon in the Window.

How to Find and Remove Duplicate Files Using Automator on External Hard Drive Mac?

Automator is a visual scripting tool that allows you to automate any task. We know that manually identifying and erasing duplicates can be hectic and challenging at times. As a result, using this workflow can help you in curtailing the overwhelming situation.

Key Considerations:

  • Requires basic knowledge of Automator.
  • Workflow actions include finding and moving files based on Name, Date Modified, etc.
  • Run the workflow to execute the deletion process.

A Step-by-Step Framework:

  • Open the Automator from the Applications folder.
  • Next, the Automator will ask you to choose a specific type of document on your external hard drive. Pick the “Workflow.”
  • In the left sidebar of Automator, find the “Files & Folders” category.
  • After that, Drag the “Get Specified Finder Items” action on the Automator window’s right side.
  • Once again, drag the “Find Finder Items” action from the “Files & Folder” category under the “Get Specified Finder Items” action.
  • Then, tap on the “Options” button in the “Find Finder Items” action.
  • Here, set the first dropdown to “Name,” the second dropdown to “Contains,” and leave the third field blank.
  • Lastly, drag the “Move Finder Items to Trash” action from the same category and place it below the “Find Finder Items” action.
  • Save your workflow by clicking “File” → “Save” and give it a name (e.g., “Delete Duplicates”).
  • Click the “Run” button in the top-right corner of the Automator window.

The workflow will execute, finding files with duplicate names and moving them to the Trash.

Apart from this, you can adjust the workflow according to your search parameters and specific requirements. Remember to double-check the results or take backups of respective files before deleting them.

Read More: Ideal answer on “how to delete duplicate photos on macOS

How to Delete Duplicate Files on Mac? – Expert Solution

No doubt the above techniques can be handy for short file sizes and scanning through names, and date modified. But cannot cater the similar results for large file sizes. Also, it is not compatible when you want to scan similar content files. Considering such a case, we offer you the best duplicate file remover utility on Mac. This tool is efficient enough to run on macOS (Macintosh Operating System) to find and remove clogged-up identical files. Further, this tool has rich features for finding any type of file format. Here are some of the features of this distinct application:

  • Efficient scanning engine
  • Deep recursive scanning option
  • Wide range of supported file extensions: EXE, MSI, MSIX, APP, DMG, PKG, ZIP, TAR, RAR, 7-ZIP, TGZ, GZ, ZIPX, etc.
  • Move or delete duplicate files easily
  • Visual similarity detection
  • Preview before deleting files
  • Compatibility with external storage devices (e.g., Pendrive, SSD, External disk, Camcorder, etc.)

Simple Steps to Identify and Remove Identical Files on macOS

Step 1. Download and Set up the Duplicate finder and remover application on your macOS.

landing tool window

Step 2. Hit on the “Add Folder” tab to add the folder containing the suspect duplicate files on your flash drive/ C drive/ external hard drive.

tap on Add Folder

Step 3. Next, pick the right scanning parameters. Then, select any particular file extension under the “Select from file extension in folder” option. After that, tap on Continue.

choose the scan parameters

Step 4. Press the “Delete” button to eliminate the similar files collected on the system.

tap on Delete tab to delete duplicate files on mac

Step 5. In the end, you will see that Action column, the message tag is changed to Deleted.

check the action tag

Final Takeaway

In this article, we have given the appropriate solution to the question of “How to Delete Duplicate Files on PC (Windows 10/11 & macOS)?” Irrespective the search is on i.e. C drive, Flash drive, External hard drive, and any other. We have covered the basic manual and free solutions to remove identical files on Windows & Mac. However, there are some instances, where the easily accessible approaches fail. Therefore, we have come up with the SysTools finder application to find and delete similar data.

Frequently Asked Questions

Q. How do I eliminate duplicate files on my Mac?

Ans. Use the methods mentioned above to eliminate duplicate files on Mac by Finder, Terminal, Smart Folder, and Automator. Here are the steps while using the New Smart Folder:

  • Open Finder, and go to “File.” Select “New Smart Folder” (or use Cmd + Option + N).
  • Next, add criteria like file type and size to identify duplicates.
  • Click column headers to arrange files by name or date for easier identification.
  • Manually review Smart Folder to spot duplicates and delete them using Delete or “Move to Trash.”

Q. How do I find duplicate files in Windows?

Ans. You can find and remove the duplicate file in Windows 10 &11 using the file explorer:

  • Open File Explorer with Windows key + E.
  • Navigate to the target folder or drive.
  • In the search bar, type “.” and press Enter to display all files.
  • Sort files by clicking “View,” then “Sort by,” and choose “Name.”
  • Manually review files, focusing on similar names, sizes, and dates.
  • Use file properties (right-click, select “Properties“) to verify size and modification date.
  • Delete duplicates by right-clicking on the file and choosing “Delete.”

Q. How do I delete duplicate files for free?

Ans. All the methods shown in this article are available for free, you can use the tool or method according to your need to get the best results.

Q. Does Mac have a duplicate file finder?

Ans. No, Mac doesn’t have an in-built application such as a duplicate file finder. But you can make a partial copy of it by using any of the above methods.

Q. How do I find duplicate files on my Mac Air?

Ans. You can easily find duplicate files on your Mac Air using Finder on macOS:

  • Open Finder and navigate to the folder or drive.
  • Use Command + F or go to “File” → “Find.”
  • Click “+” to add criteria, choose “Kind” and set it to “Any.”
  • Add another criterion with “+” and select “Other,” search for “Size,” and add it.
  • Set a reasonable size range.
  • Click “Save” for future use.

Q. How to Delete Duplicate Files on Flash Drive/External Hard Drive on macOS?

Ans. Follow the steps given below to remove duplicate files on the desired drive:

  • Press Command + Space, type “Terminal,” and press Enter.
  • Use the cd command to reach your flash drive, e.g., cd /Volumes/YourFlashDrive.
  • Execute find . -type f -exec md5sum {} \; | sort | uniq -w32 -dD to locate duplicates.
  • Check the displayed list of grouped duplicate files in the Terminal.
  • Use rm command cautiously, e.g., rm duplicate_file.txt. Replace with the actual filename.
  • Run the find command again to ensure all duplicates are removed.
  • Type exit and press Enter to close the Terminal window.

Q. Is It Safe To Delete Duplicate Files?
Ans. Yes, it is generally safe to remove duplicate files, but remember the following points:

  • Backup: Before deleting duplicates, make sure to have a backup to avoid accidental data loss.
  • Verify Content: Examine the similar files that are exact copies and not crucial variations.
  • Use Reliable Tools: Use the finest application to identify and remove identical files.
  • System Files: Check before you delete. If you delete some of the essential system files, it may cause instability in your operating system.
  author

By Tej Pratap Shukla

A versatile technocrat, always in the search for new and interesting areas related to technology. Works on multiple technical problems faced by users frequently. Provides the user-friendly solutions to deal with numerous technical issues.