How to find and delete duplicate files on a Mac
Updated
macOS has no built-in tool that finds duplicate files in Finder. You can narrow the search by hand, but the only reliable test is whether two files have identical contents, not whether they share a name.
How copies end up on your Mac
Most duplicates are made without you noticing. Knowing where they come from tells you where to look.
- Downloading twice. Browsers such as Chrome add a number, so you get report.pdf and report (1).pdf.
- Duplicate in Finder. Command-D creates report copy.pdf next to the original.
- Keep Both. Copying a file into a folder that already has one with that name, and choosing Keep Both, adds a number such as report 2.pdf.
- Exports and AirDrop. Photos exported or received again land in Downloads or on the Desktop with new names, so nothing about the name gives them away.
Check Photos first
If the duplicates are pictures in the Photos app, open Photos and look under Utilities in the sidebar for Duplicates (macOS Ventura and later). It only covers the Photos library, not files in folders. The duplicate photos guide walks through merging them.
Narrow it down in Finder
- In Finder, choose File, then New Smart Folder.
- Click the plus button and add a Kind rule, for example Kind is PDF, or choose Other to add File Size.
- Switch to list view with Command-2 and sort by Size.
- Files with exactly the same size sitting next to each other are your candidates. Sort by Name as well to catch copy, (1) and 2 endings.
A matching name and size is only a hint. Two files can share both and still differ, and real duplicates are often named differently.
Confirm two files are identical
For a handful of suspects, Terminal gives a definite answer without changing anything. Type the command, a space, then drag each file into the window to add its path.
shasum -a 256followed by both files prints a long fingerprint for each. If the fingerprints match, the contents are identical.cmpfollowed by both files prints nothing when they are the same and reports the first difference when they are not.
Decide which copy to keep
| Situation | Usually keep |
|---|---|
| One copy in Downloads, one in a project folder | The one in the project folder |
| One copy is used by an app, such as a music or video project | The one the app points to |
| Same picture as HEIC and as JPEG | Not true duplicates; keep the format you need |
| An edited version and the original | Both, unless you only want the edit |
Compare contents with FileSift
A tool that reads file contents can tell real duplicates from look-alikes across many folders at once. FileSift finds identical files and look-alike photos, shows each group as thumbnails, always keeps one copy in each group, and checks the files again just before anything moves. Files that are stored only in iCloud are shown but never treated as duplicates, so nothing is downloaded in the background.
Delete safely
Move the extras to the Trash instead of deleting them straight away, and empty the Trash only after you have checked that the copy you kept opens. Leave the insides of app bundles and the Photos and Music libraries alone; manage those from their own apps.
On the APFS file system used by current Macs, a copy made in Finder on the same disk can share storage with the original until one of them changes. Removing such a copy may free less space than its size suggests.
Common questions
Is a file with the same name always a duplicate?
No. Two files can share a name and differ in content, and true duplicates are often named differently. Compare size and contents before deleting.
How many copies should I keep?
Keep exactly one in each group. FileSift always keeps one copy and moves the others to the Trash.
Can I undo deleting a duplicate?
Yes, until you empty the Trash. Open the Trash, right-click the file and choose Put Back.
Related guides
- How to delete duplicate photos on a Mac
- HEIC photos on a Mac: what they are and how to convert them to JPEG
- How to recover deleted files on a Mac
- Mac cleaner apps: what the different kinds do, and where FileSift fits
- How to free up space on your Mac
More in How-to guides, or see all guides.