How to find duplicate files on Mac and remove similar photos safely
To find duplicate files on a Mac, match files by their contents, not their names. For photos in the Photos app, use the built-in Duplicates view and click Merge. For files in folders, compare SHA-256 hashes in Terminal or use a duplicate finder app. Back up first, skip app and library folders, and empty the Trash to get the space back.
Duplicates build up on every Mac. The same attachment gets downloaded twice, a folder gets copied “just in case”, a camera roll gets imported again, and an export sits next to its original. On a small drive the copies add up, and they make the right version harder to find.
This guide covers what counts as a duplicate, why matching by content is the only safe test, and every practical way to find duplicates on macOS: the Photos and Music apps, Finder, Terminal and dedicated apps. It ends with the safety checks that matter. Steps were checked against Apple’s documentation for macOS Sonoma 14, Sequoia 15 and later at the time of writing (October 2026).
- Exact duplicates have identical contents. A SHA-256 hash proves it; a matching name or size does not.
- Photos library: use Photos’ own Duplicates view (macOS Ventura 13 and later). Never delete files inside the library package by hand.
- Folders and drives: a short Terminal pipeline lists identical files for free, and apps add previews, similar-photo matching and a safer review step.
- Similar photos (burst shots, near-identical takes) need image comparison, not hashing, and always need a human decision.
- Space only comes back when you empty the Trash or Recently Deleted, and deleting an APFS clone or a hard link may free almost nothing.
What counts as a duplicate file on a Mac?
A duplicate file is a second file whose contents are byte-for-byte identical to another file, no matter what either one is called or where it lives. That definition matters, because three different situations get called “duplicates” and each needs a different approach.
- Exact duplicates. Two files with identical contents, such as
Invoice.pdfin Downloads andInvoice (1).pdfnext to it. Keeping one loses nothing. - Similar or look-alike photos. Burst-style shots, a photo and its edited export, or the same picture saved as HEIC and JPEG. To your eye they are the same moment, but the files differ, so no exact-match tool will pair them. Choosing between them is a judgment call: one may be sharper or have someone’s eyes open.
- Same name, different file. Two files called
Resume.docxin different folders may be two different versions. Deleting one because the names match is the most common way people lose work during a cleanup.
A fourth case is not really a duplicate at all: an APFS clone or a hard link, which looks like a second copy but shares storage with the original. That case is covered in the section on why deleting duplicates may not free space.
Why should you match duplicates by content, not by name or size?
Matching by content is the only test that proves two files are identical, because names and sizes can match by coincidence and can differ for identical files. A size match is suggestive but weak: two different photos can have the same size in bytes.
The reliable method is a hash. A hash (or checksum) is a short fingerprint calculated from every byte of a file; change a single byte and the fingerprint changes completely. SHA-256 is a widely used hash function that produces a 64-character fingerprint, and no two different files with the same SHA-256 value have ever been publicly found. If two files have the same SHA-256 hash, you can treat them as identical.
Good duplicate finders often compare sizes first, since files of different sizes can’t be identical, then hash only files that share a size.
How do I remove duplicates in the Photos app on a Mac?
The Photos app on macOS Ventura 13 and later finds duplicate photos and videos in your library automatically and lets you merge them into one. Use this method for anything inside your Photos library, because it updates the library safely instead of deleting files behind its back.
On macOS Sequoia 15 and later (including macOS Tahoe 26):
- Open Photos.
- In the sidebar, click Utilities › Duplicates. If you don’t see Duplicates, hold the pointer over Utilities and click the disclosure arrow.
- If you use iCloud Shared Photo Library, click the Library pop-up menu in the toolbar and choose Both Libraries.
- Select the duplicates to merge. You can select items in one row, or several rows at once. Press ⌘A to select every duplicate.
- Click Merge [number] Items, then confirm in the dialog.
On macOS Ventura 13 and Sonoma 14, Duplicates appears directly in the sidebar, and the button reads Merge [number] Duplicates. If the Duplicates item is missing entirely, Photos either hasn’t finished analyzing the library (large libraries take a while) or has found none.
According to Apple’s guide to removing duplicates in Photos, merging keeps one original where the duplicates were and moves the other copies to Recently Deleted, where you can recover them for 30 days. If iCloud Photos is on, the change syncs, so the extra copies disappear from your other devices too.
Two limits are worth knowing. Apple doesn’t document the exact rules Photos uses to decide that two items are duplicates, so look at each row before merging a large batch. And the Duplicates view only covers the Photos library: copies you exported to Desktop or Downloads are ordinary files and need one of the methods below.
Duplicate songs in the Music app
The Music app has its own duplicate finder. Click Songs in the sidebar, select a song, then choose File › Library › Show Duplicate Items. That view also lists the same song on different albums, such as a studio album and a soundtrack, so for true copies hold ⌥ (Option) and choose File › Library › Show Exact Duplicate Items, which only matches the same song, artist, album and version. Click Done to return to the full list.
Can Finder find duplicate files?
Finder has no command that finds duplicate files, but its list view and Smart Folders can surface likely candidates for you to check by hand. Treat what Finder shows as suspects, not confirmed duplicates.
To spot candidates in one folder:
- Open the folder and choose View › as List (⌘2).
- Click the Name column header to sort by name. Copies made by Finder’s File › Duplicate (⌘D) end in “copy”, and repeat downloads often end in a number such as “(1)”, so they line up next to their originals.
- Click the Size column header to sort by size. Files with exactly the same size, shown under File › Get Info (⌘I) in bytes, are worth comparing.
- Select a pair and press Space to compare them in Quick Look before you delete anything.
To search across your whole Mac, use a Smart Folder, which is a saved search that updates itself:
- In Finder, choose File › New Smart Folder.
- Click This Mac to search everywhere, rather than the current folder.
- Click the Add (+) button and set a rule, for example Name › contains › copy, or Kind › is › Image. For size, choose Other… in the first pop-up menu and add File Size, then set is greater than a value such as 100 MB.
- Switch to list view and sort by name or size, as above.
- Click Save to keep the search in the sidebar.
The limits are real. Finder can’t compare contents, so it misses duplicates with different names and flags different files that share a name. Smart Folders rely on the Spotlight index, so they skip folders Spotlight doesn’t index (see our guide on Spotlight not finding files). And Finder shows the size of each copy as if it used its own storage, even when it is a clone.
How do I find duplicate files with Terminal on a Mac?
Terminal can list every set of identical files in a folder by computing a SHA-256 hash for each file with shasum and printing the files whose hashes repeat. This method is free, exact and read-only: it deletes nothing.
Open Terminal (in Applications › Utilities), change to the folder you want to check, then run the three commands:
cd ~/Documents
find . -type f ! -name '.DS_Store' ! -path '*.photoslibrary/*' ! -path '*.app/*' -exec shasum -a 256 {} + | sort > /tmp/hashes.txt
cut -c 1-64 /tmp/hashes.txt | uniq -d > /tmp/dupes.txt
grep -F -f /tmp/dupes.txt /tmp/hashes.txt
What each part does:
cd ~/Documentsmoves into the folder to scan. Replace it with any folder, or an external drive under/Volumes/.find . -type flists every regular file in that folder and its subfolders.! -name '.DS_Store'skips Finder’s hidden view-settings files, which are often identical and not worth reporting.! -path '*.photoslibrary/*' ! -path '*.app/*'skips the insides of Photos libraries and app bundles, which you should never edit by hand.-exec shasum -a 256 {} +runsshasumwith the SHA-256 algorithm on the files, in batches. Each output line is a 64-character hash, two spaces and the file path.sort > /tmp/hashes.txtsorts the lines so identical hashes sit next to each other, and saves them outside the folder being scanned.cut -c 1-64keeps only the hash, anduniq -dprints each hash that appears more than once.grep -F -f /tmp/dupes.txt /tmp/hashes.txtprints every file whose hash is in the duplicates list, grouped by hash.
Hashing reads every byte, so large folders take a while. To check only big files, add -size +1M after -type f, which skips files of 1 MB or less.
Before deleting anything from the list, check for hard links. A hard link is a second name for the same file on disk. Run ls -li on the two paths: if the first column (the inode number) is the same, both names point to one file, and removing one frees nothing.
Don’t pipe this output into rm. rm deletes immediately and skips the Trash, and an automatic rule can’t tell which copy a project, a library or an app still expects. Open each group, decide which copy to keep, and drag the others to the Trash in Finder.
Which duplicate file finder apps work well on a Mac?
A duplicate finder app is worth it when you want previews, side-by-side comparison of similar photos, or a review screen instead of a text list. These details were checked on each official page at the time of writing (October 2026).
- Gemini 2 (MacPaw). A dedicated duplicate finder that scans folders, the Photos library, the Music library, and external and network drives, and also detects similar photos and music. By default it moves duplicates to the Trash so you can restore them. It is free to download from the Mac App Store, with some features only partly available until you buy a paid plan. See MacPaw’s Gemini 2 page.
- Hyperspace. A different approach: instead of deleting duplicates, it finds files with identical contents on an APFS volume and turns the extra copies into space-saving clones, so every file stays where it is and the duplicate storage is reclaimed. Scanning is free, and reclaiming space is a paid unlock. It is the better fit when you can’t delete copies because other apps or projects refer to them. See the Hyperspace page.
- dupeGuru. A free, open-source duplicate finder for Mac, Windows and Linux that can match by file name or contents and has a picture mode for similar images. Its latest release dates from 2022, so check that it runs well on your macOS version.
- FindGlance. Covered in the next section.
How does FindGlance find duplicate files and similar photos?
FindGlance is a Mac app for finding and tidying files that shows images, videos, music, documents, archives and apps as large thumbnails, and its Duplicates view finds exact duplicates by contents and similar photos side by side. Open it from the Home dashboard or with ⇧⌘D.
We built the Duplicates view around the rules in this guide:
- Exact duplicates are matched by their contents with a SHA-256 hash, never by name or size alone.
- Similar photos (look-alikes and burst-style shots) are matched with Apple’s Vision feature prints and shown side by side with Keep and Trash, so you pick the best shot yourself.
- Nothing is deleted automatically. You confirm each removal, and files only ever go to the Trash, so you can put them back.
- iCloud-only files are skipped. Files stored only in iCloud and not downloaded are left out of duplicate checks.
- Everything runs on your Mac. FindGlance checks the folders you allow in Settings, and file names and contents are never uploaded.
FindGlance is not a replacement for Photos’ own Duplicates view: for pictures inside your Photos library, merge them in Photos. It also deletes copies rather than converting them into clones, so if you need every copy to stay in place, Hyperspace is the better tool. FindGlance needs macOS 14 Sonoma or later. Every feature is free for 7 days, with no card or email; after that, FindGlance Pro is a one-time purchase, not a subscription. See FindGlance pricing.
Which method should you use to find duplicates?
Use Photos’ Duplicates view for your photo library, Terminal or an app for folders and drives, and an app with image comparison if you want to weed out similar shots. This table summarizes what each method covers.
| Method | Finds exact duplicates | Finds similar photos | Covers Photos library | Covers folders and drives | Free |
|---|---|---|---|---|---|
| Photos › Duplicates | Yes, inside the library | Not documented | Yes | No | Yes, built in |
| Music › Show Exact Duplicate Items | Songs only | No | No | No | Yes, built in |
| Finder list view and Smart Folders | No, candidates by name and size | No | No | Yes | Yes, built in |
Terminal (shasum) |
Yes, by SHA-256 | No | No, skip it | Yes | Yes, built in |
| Gemini 2 | Yes | Yes | Yes | Yes, including external and network drives | Free download, paid plan for full features |
| Hyperspace | Yes, turns copies into clones | No | Not stated | Yes, APFS volumes | Free scan, paid to reclaim space |
| dupeGuru | Yes, contents mode | Yes, picture mode | Not stated | Yes | Yes, open source |
| FindGlance | Yes, by SHA-256 | Yes, Pro | Use Photos’ Duplicates | Yes, folders you allow | 7-day trial, then one-time Pro |
Is it safe to delete duplicate files on a Mac?
Deleting duplicate files is safe when the copies are confirmed identical by contents, live in your own folders, and go to the Trash first. It is risky when you delete inside app bundles, libraries or system folders, or when a tool decides for you.
- Back up first. Set up Time Machine in System Settings › General › Time Machine and click Add Backup Disk, as described in Apple’s Time Machine guide. Run a backup before a big cleanup.
- Stay out of app bundles. Apps contain many identical small files on purpose. Removing one can break the app.
- Stay out of libraries. The Photos Library and Music library are packages managed by their apps. Deleting files inside them by hand can damage the library; use Photos’ and Music’s own duplicate tools instead.
- Stay out of system folders such as
/System,/Libraryand~/Library. Copies there usually exist for a reason. - Keep the copy in the right place. If a project, a website folder or another app refers to a file by its path, keep the copy at that path and delete the stray one.
- Review similar photos one set at a time. Never remove look-alikes in bulk without looking.
Use the safety nets. Items you move to the Trash stay there until you empty it, unless you turned on Remove items from the Trash after 30 days in Finder › Settings › Advanced. Photos merged in the Photos app stay in Recently Deleted for 30 days.
Why didn’t deleting duplicates free up any space?
Deleting duplicate files usually frees no space right away because the copies are still in the Trash or in Photos’ Recently Deleted, and sometimes because the “duplicates” were sharing storage all along.
- The Trash isn’t empty. Choose Finder › Empty Trash (⇧⌘⌫) once you are sure.
- Recently Deleted isn’t empty. Merged photos wait there for 30 days. Open Recently Deleted in Photos and delete them permanently to reclaim the space sooner.
- The copy was an APFS clone. APFS (Apple File System) is the format of every modern Mac’s startup disk. A clone is a copy that shares the original’s data on disk instead of storing it twice; only the parts you later change use new space. Duplicating a file in Finder on the same APFS volume makes a clone. Finder and
shasumshow a clone as a normal, full-size file, but deleting it may free little or nothing, because the original still uses the shared data. - The copy was a hard link. As explained in the Terminal section, two hard-linked names are one file. The space only comes back when the last name is removed.
- The file was only in iCloud. A file with a cloud icon in Finder isn’t stored on your Mac, so deleting it frees no local space.
Duplicates are usually only part of a full drive. For large videos, old installers and unopened downloads, see our guide to freeing up storage on a Mac. For other tools that work next to Finder, see our comparison of Finder alternatives for Mac.
Frequently asked questions
Does merging duplicates in the Photos app keep the best version?
Apple says merging keeps one original photo or video where the duplicates were and moves the other copies to Recently Deleted. Apple doesn’t document which copy is kept, so check a row before merging if one version matters to you. Anything you merge by mistake can be recovered from Recently Deleted for 30 days.
Is there a free way to find duplicate files on a Mac?
Yes. The Photos app’s Duplicates view and the Music app’s Show Exact Duplicate Items are built in, and Terminal can list identical files by comparing SHA-256 hashes with shasum. dupeGuru is a free, open-source app, and Gemini 2 is a free download with a paid plan for its full features.
Will deleting duplicate photos on my Mac also delete them from my iPhone?
If iCloud Photos is turned on, yes: deleting or merging photos on the Mac syncs to every device signed in to the same Apple Account. The removed copies stay in Recently Deleted for 30 days before they are permanently deleted. If iCloud Photos is off, the change only affects the Mac.
Can two different files have the same SHA-256 hash?
In theory yes, but no two different files with the same SHA-256 hash have ever been publicly found. In practice, two files with matching SHA-256 hashes can be treated as identical, which is why duplicate finders use content hashes rather than names or sizes.
Why does my Mac have so many duplicate files?
Most duplicates come from ordinary habits: downloading the same attachment more than once, copying a folder as a quick backup, importing photos twice, or exporting a photo that is still in the Photos library. Downloads, Desktop and Pictures are usually the best places to start looking.
Should I delete a duplicate that is on an external drive?
Only if you are sure it isn’t your backup. A copy on another drive uses that drive’s space and protects you if your Mac’s disk fails, so it is often a copy you want to keep. Remove extra copies within the same drive first.
Are files with “copy” in the name always duplicates?
No. Finder adds “copy” when you duplicate a file, but either file may have been edited since, so the contents can differ. Compare them with Quick Look or a content hash before deleting, and keep the copy at the location other apps or projects expect.
Does FindGlance delete duplicate files automatically?
No. FindGlance is a Mac app for finding and tidying files; it matches exact duplicates by their contents and shows similar photos side by side, but you confirm every removal. Files only go to the Trash, so you can put them back Every feature is free for 7 days, then FindGlance Pro is a one-time purchase.