Duplicate files & photos

How to Find and Remove Duplicate Files on Mac (2026 Guide)

If your Mac storage feels like it's shrinking even though you haven't downloaded anything new, duplicate files are a likely culprit. Photos synced from iPhone, documents saved twice, installer packages downloaded across multiple sessions — they accumulate quietly. This guide shows you exactly how to find duplicate files on Mac using free built-in methods and, when you'd rather not spend an afternoon in Terminal, a faster one-click alternative. You'll also learn what's safe to delete and what to leave alone.

Why Duplicates Pile Up on Mac

Duplicates on macOS come from a handful of predictable sources:

  • Photo imports — importing the same camera roll or iCloud library more than once creates pixel-for-pixel copies, often in ~/Pictures.
  • Downloads folder — browsers re-download files when a previous download is interrupted, leaving filename.zip and filename (1).zip side by side.
  • iCloud Drive conflicts — when a file is edited offline on two devices simultaneously, macOS creates a conflict copy with a timestamp appended to the name.
  • App installers and disk images.dmg files in ~/Downloads can easily represent gigabytes of redundant data once the app is already installed.
  • Xcode derived data and simulator runtimes — for developers, ~/Library/Developer/Xcode/DerivedData can hold several copies of build artifacts for the same project.

Before You Start: What Is Safe to Delete

Duplicates in your personal folders — ~/Downloads, ~/Documents, ~/Pictures, ~/Movies — are safe to review and delete. Do not touch files inside /System, /usr, or /Library (the root-level one) by hand; macOS may place identical-looking files there for a reason, and removing them can break apps or the OS itself. Deletion is permanent once you empty the Trash, so move files to Trash first and wait a day before emptying if you're uncertain.

Method 1: Find Duplicates with Finder Smart Folders

Finder Smart Folders won't find byte-identical duplicates, but they are useful for spotting the most common patterns: files with (1), (2), or copy in the name.

  1. Open Finder and choose File → New Smart Folder (or press Cmd ⌘ + Option + N).
  2. Click the + button in the top-right corner to add a search rule.
  3. Set the first dropdown to Name and the second to contains, then type copy (with a leading space). This matches the naming pattern that Finder itself uses when you duplicate a file.
  4. Add a second rule: Namecontains(1) to catch browser-renamed downloads.
  5. Save the Smart Folder so you can rerun it later.

Limitation: Smart Folders match on filename patterns only — they will not catch duplicates that were renamed or copied with a different name. For true content-based matching, use Terminal or a dedicated tool.

Method 2: Find True Duplicates in Terminal Using md5

The md5 command generates a cryptographic fingerprint (hash) of a file's content. Two files with the same hash are identical regardless of what they're named or where they live. This approach takes patience but costs nothing.

Step 1: Hash every file in a folder

find ~/Downloads -type f -exec md5 {} \; 2>/dev/null | sort > /tmp/downloads_hashes.txt

This walks every file in ~/Downloads, computes its md5 hash, and writes the results to a temporary file. Replace ~/Downloads with any folder you want to scan, such as ~/Documents or ~/Pictures. The 2>/dev/null suppresses permission errors for files your account can't read.

Step 2: Identify duplicate hashes

awk -F'=' '{print $NF, $0}' /tmp/downloads_hashes.txt | sort | awk 'prev==$1 {print last; print} {prev=$1; last=$0}' | cut -d' ' -f2-

This pipeline extracts the hash portion of each line, groups them, and prints only lines where the same hash appears more than once. Each pair of lines in the output represents two files with identical content.

Step 3: Review before you delete

Open the output file and inspect each pair. Never script a bulk deletion from md5 output without reviewing it first — files with the same hash may both be wanted if they serve different purposes in different folders.

This method works, but scanning a large home folder can take 10–30 minutes and requires comfort reading Terminal output. If you have a lot of files or want to scan your full home directory, the manual approach becomes unwieldy quickly.

Method 3: One-Click Duplicate Finder with Crumb

If the Terminal route feels like more effort than the space you'd save is worth, Crumb has a built-in Duplicates finder that does the same content-hashing scan visually. It groups exact matches by file content (not just name), shows you the size each group occupies, and lets you choose which copy to keep before removing the rest.

  1. Download Crumb and install it (Apple-notarized, no account required).
  2. Open Crumb from the menu bar and click Duplicates.
  3. Select the folders to scan — your home folder, Downloads, or a specific directory.
  4. Crumb groups duplicate sets and shows total wasted space per group. Select which copy to keep (it defaults to the one in the most logical location) and click Remove.

If you're unsure whether a file is something an app depends on, Crumb's Is this safe to delete? button explains the folder's purpose and flags any risk before you commit.

Comparison: Three Approaches at a Glance

Method Finds by name pattern Finds by content (true duplicates) Time to scan 50 GB Cost
Finder Smart Folders Yes No Under 1 min Free
Terminal md5 No Yes 10–30 min Free
Crumb Duplicates Yes Yes 2–5 min Free tier (1 cleanup); $49 lifetime

Where to Look First: High-Value Targets

Not all folders are equally likely to harbour duplicates. Focus your scan on these locations first for the fastest payoff:

  • ~/Downloads — the single most common source; browser downloads, installers, and email attachments accumulate here.
  • ~/Pictures/Photos Library.photoslibrary — if you import from a camera or iPhone repeatedly, near-duplicate shots and identical exports stack up. Note: don't open or modify the library bundle directly; use the Photos app or a tool that understands its format.
  • ~/Movies — screen recordings and exported video drafts can be large and are frequently duplicated.
  • ~/Documents — watch for iCloud conflict copies (files with "conflict" or a date appended by macOS).
  • ~/Library/Application Support — some apps cache assets redundantly here, though be cautious: only remove files you can positively identify as personal data, not app configuration.

Files That Look Like Duplicates But Aren't

A few situations produce identical-looking entries that should not both be deleted:

  • Hard links — macOS Time Machine and some backup systems use hard links to point multiple directory entries at the same underlying data block. Deleting both entries only frees space once. The md5 approach above can't distinguish hard links from true copies; a tool that checks inodes handles this correctly.
  • App bundles — if you have two versions of the same app (e.g., an older copy in a Downloads subfolder and the current version in /Applications), they'll match by name but you generally want the one in /Applications and can safely remove the installer copy.
  • System frameworks/System/Library/Frameworks contains many files that appear identical across framework versions. Leave these alone.

After the Cleanup: Preventing Future Duplicates

  • Set your browser to ask where to save each download, or clear ~/Downloads monthly.
  • Use iCloud's Optimize Mac Storage setting (System Settings → Apple ID → iCloud → Photos) to keep only thumbnails on-device when storage is tight.
  • After recording a screen or exporting a video, delete the working copy once you've confirmed the export looks right — don't keep both.
  • Run a duplicate scan after each major project concludes, before the files scatter across your folder tree.

Conclusion

Finding and removing duplicate files on Mac is straightforward once you know where to look. Finder Smart Folders get you partway there in under a minute for obvious name-based duplicates. Terminal's md5 command gives you a thorough content-level scan at no cost, but it takes time and manual review. If you want the same accuracy with a fraction of the effort — and a safety check before anything is removed — Crumb's Duplicates finder handles the whole process in a few clicks. Either way, the key rule is the same: review before you delete, and empty the Trash only after you're certain.

Reclaim your disk in one click

Crumb audits your whole Mac, tells you what's safe to delete, and frees the space in seconds — private, local, and Apple-notarized.

Download Crumb for macOS

Frequently asked questions

How do I find duplicate files on Mac for free?
Two free built-in methods work well. First, use a Finder Smart Folder (File → New Smart Folder) with a Name rule set to 'contains (1)' or 'contains copy' to catch browser-renamed and Finder-duplicated files. For true content-based matching, open Terminal and run 'find ~/Downloads -type f -exec md5 {} \;' to generate hashes for every file, then look for identical hash values — matching hashes mean identical file contents regardless of filename.
Is it safe to delete duplicate files on Mac?
Duplicates in your personal folders — Downloads, Documents, Pictures, Movies — are generally safe to delete after reviewing them. Never manually delete files inside /System, /usr, or the root-level /Library, as macOS may rely on files that look redundant. Always move files to Trash first rather than deleting immediately, and wait before emptying Trash if you're uncertain any file is needed.
Why does my Mac have so many duplicate files?
The most common sources are: repeated photo imports from iPhone or a camera, browsers re-downloading interrupted files (creating filename (1).zip alongside filename.zip), iCloud Drive conflict copies created when the same file is edited on two devices simultaneously, and developer tools like Xcode that cache build artifacts across multiple project builds.
What is the fastest way to remove duplicate files on Mac?
A dedicated duplicate finder is faster than manual Terminal commands for most users. These tools scan by file content (not just name), group duplicates visually, and let you choose which copy to keep before removing the rest — a scan that would take 20+ minutes in Terminal typically completes in 2–5 minutes with a GUI tool. Crumb's Duplicates finder also includes a safety check that explains any file before you commit to deleting it.