SpaceBroom
  • Features
  • Space Lens
  • Safety
  • Pricing
  • FAQ
  • Guides
Buy
Home › Guides

How to find and remove duplicate files and photos on your Mac

Updated October 20, 2026

In short: Since macOS 13 Ventura, the Photos app shows duplicate photos in the Duplicates collection, from macOS 15 under Utilities in the sidebar. You merge them there: one copy stays, the others remain in Recently Deleted for 30 days. Duplicate files in your folders can only be identified reliably by their content, not their names; in Terminal you compare two files byte by byte. Always keep one copy, and never delete anything inside libraries, projects or apps.

How do I remove duplicate photos in the Photos app?

According to Apple's Photos User Guide, the app detects duplicates on its own and collects them in Duplicates. To merge them:

  1. Open Photos and click Duplicates below Utilities in the sidebar. If you don't see it, hold the pointer over Utilities and click the arrow to expand it. In macOS 13 and 14, Duplicates sits directly in the sidebar.
  2. If you use iCloud Shared Photo Library, click the Library pop-up menu in the toolbar and choose Both Libraries.
  3. Select the duplicates you want to merge: individual items in a row or several rows at once. Command-A selects all of them.
  4. Click the button that states the number, such as Merge 3 Items, and confirm in the dialog. In macOS 13 and 14 it reads, for example, Merge 3 Duplicates.

Afterwards, one original photo or video appears where the duplicates were. The other copies go to Recently Deleted, where you can recover them for 30 days; after that, Photos deletes them permanently. In large libraries, Apple says it can take a while for duplicates to appear, because Photos has to analyse the pictures first.

Delete photos only in the app, never in the Finder. The library is a package, a folder that the Finder shows as a single file, and Apple explicitly warns against opening or changing its contents in the Finder, because that can corrupt or delete the library.

How do I find duplicate files in my folders?

A name tells you nothing: "Report.pdf" and "Report 2.pdf" can differ, while two files with entirely different names can be identical. What counts is the content. To compare two suspicious files byte by byte in Terminal:

cmp file1 file2

If the command prints nothing, the files are identical; otherwise it names the first position where they differ. Instead of typing the paths, drag the files from the Finder into the Terminal window. To compare several files at once, calculate their checksums: a checksum (also called a hash) is a long string calculated from the entire content that changes completely if even one byte differs.

shasum -a 256 file1 file2 file3

Files with the same string have the same content. Both commands only read and change nothing. Candidates are most likely in Downloads, on the Desktop and in folders you copied photos or exports into. In the Finder's list view, click the Size column so files of the same size end up next to each other.

Which copy should I keep?

Keep the file where you would look for it, usually the oldest one in a tidy folder. Before deleting, check whether an app refers to one particular copy, such as a presentation or a project that embeds an image from a specific folder. Move copies to the Trash first and empty it only when nothing is missing; until then they still take up space.

When does deleting duplicates free nothing or do harm?

  • Clones on APFS: According to Apple, APFS has been the Mac's default file system since macOS High Sierra. When an app copies a file with the copy functions of macOS on the same volume (such as "Macintosh HD"), Apple says the result is a clone: a copy that occupies no additional space because it shares its data with the original. Only changes need space of their own. Each of the two files is still shown at full size, and deleting an unchanged clone frees practically nothing.
  • Projects and Git repositories: in project folders, including those whose versions the Git program manages, identical files are often intended, such as images or code libraries. If one goes missing, the project may no longer build or open.
  • Photos, Music and TV libraries and the insides of apps: the respective app manages these files. If you delete one in the Finder, the app is missing it, for example as a song in Music.

Frequently asked questions

Does merging duplicates in Photos delete pictures permanently?

Not right away. One copy stays in the library, and according to Apple the others remain in Recently Deleted for 30 days, where you can recover them; after that, Photos deletes them permanently.

Why doesn't Photos show any duplicates?

Duplicate detection is available in Photos from macOS 13 Ventura. In large libraries, Apple says it takes a while until Photos has analysed all pictures, and from macOS 15 Duplicates can be hidden in the collapsed Utilities section.

Does deleting a duplicate always free up storage?

No. In the Trash the file still takes up space until you empty it. If the copy is an APFS clone, hardly anything is freed even then, because the original and the clone share the same data.

How can I be sure two files are identical?

By their content, not their name or date. The Terminal command cmp file1 file2 compares them byte by byte and prints nothing if they are identical.

Faster with SpaceBroom

The Duplicates section of SpaceBroom searches your home folder for files from 1 KB with byte-identical content, checked with a SHA-256 checksum. For each group the app suggests the oldest copy as the original and always leaves at least one, even if you try to select them all. It skips files in projects, Git repositories, packages such as apps, and the Photos, Music and TV libraries; it does not read ~/Library, hidden files or files that are only in iCloud. Similar Photos searches the same folders for pictures that closely resemble each other, such as burst shots or lightly edited versions, and preselects nothing; SpaceBroom does not read the Photos library, so use Duplicates in Photos for that. What you remove, the app moves to the Trash. More ways to free up space are in the guide How to free up storage space on your Mac: 9 ways that work.

All in one app.

SpaceBroom finds system junk, large files, duplicates and the leftovers of old apps. Only what you confirm is removed.

Try it free See prices

More guides

  • How to free up storage space on your Mac: 9 ways that workMac storage full? See what takes up space and free it up: the Trash, Downloads, large files, unused apps, old device backups and more.
  • System Data on your Mac: what it is and how to reduce itSystem Data taking up many gigabytes? What the category holds, what macOS cleans up by itself and what you can safely remove.
  • How to uninstall apps on your Mac completely, with no leftoversDragging an app to the Trash leaves settings, caches and background services behind. Where the leftovers are and how to remove them safely.
  • How to clean up DerivedData, archives and simulators on your MacXcode DerivedData, archives, device symbols and simulators: where they are, what you can safely delete and what Apple says to keep.
  • How to clean up node_modules and package caches on your Macnode_modules, the caches of npm, Yarn, pnpm and pip, Homebrew and Docker: where they are, how big they get and how to clean them up safely.
  • Is it safe to delete caches on your Mac?Is it safe to clear caches on a Mac? What caches are, where they are stored, what macOS clears by itself and which folders to leave alone.
  • How to find large files on your MacVideos, downloads and old archives often take the most space. How to find large files with macOS Storage settings, the Finder or Terminal.

© 2026 DIGITALPASSION Ltd.

  • Guides
  • Legal notice
  • Privacy
  • Terms and licence
  • Withdrawal
  • Cancel contracts here
  • Withdraw from contract
  • Find your license