# How do I find and delete duplicate files and photos safely?

URL: https://www.kemptdesk.com/guides/delete-duplicate-files-mac-pc
Platform: Mac and PC
Applies to: macOS 13 Ventura and later, iOS 16 and later, Windows 10 and Windows 11
Reviewed: 2026-11-23
Publisher: KemptDesk (https://www.kemptdesk.com), a disk clean-up app for Mac and PC

For photos on a Mac or iPhone, open the Duplicates album in Photos (macOS 13 or iOS 16 and later) and merge the copies. For other files, Windows has no built-in duplicate finder, so compare checksums with `shasum -a 256` on a Mac or `Get-FileHash` on Windows before you delete. A matching name or size is not proof.

## Where duplicates come from

Most copies are made by accident. You download a file twice, save an attachment again, import the same photos twice, or copy a folder "just in case".

They usually sit in these folders:

- Mac: `~/Downloads`, `~/Desktop`, `~/Documents` and `~/Pictures`.
- Mac, iCloud Drive: `~/Library/Mobile Documents/com~apple~CloudDocs`.
- Windows: `C:\Users\<you>\Downloads`, `Desktop`, `Documents` and `Pictures`.
- Windows, OneDrive: `C:\Users\<you>\OneDrive`.

Downloads is the usual place for names such as `report (1).pdf`; [how to sort a messy Downloads folder](https://www.kemptdesk.com/guides/organize-downloads-folder) covers it in detail. For everything else that fills a disk, see [what fills a Mac and in what order to check](https://www.kemptdesk.com/guides/mac-storage-full).

## Which duplicates are safe to delete

| Path | What it is | Safe to delete | What happens if you delete it | How to clean it |
| --- | --- | --- | --- | --- |
| `~/Downloads/report (1).pdf`, `Downloads\report (1).pdf` | A second download of the same file | Careful | Nothing, if the checksums match. If they do not, you can lose a newer version. | Compare checksums, then delete the copy with the number |
| `~/Documents`, `~/Desktop`, `Documents` | The same document saved in two folders | Careful | Apps and recent-file lists that open the file from that folder no longer find it. | Keep the copy in the folder you work in |
| `~/Pictures/Photos Library.photoslibrary` | Photos library with its own copies and previews | No | Changing files inside the library by hand can lose photos or edits. | Use the Duplicates album in Photos |
| `/Applications/*.app`, `C:\Program Files` | Files inside installed apps | No | The app can stop working. | Leave them; uninstall the app instead |
| `~/Library`, `%APPDATA%`, `%LOCALAPPDATA%` | App data, settings and caches | No | An app can lose its settings or data. | Leave them |
| `node_modules`, `.git`, `site-packages` | Project and package files | No | The project no longer builds or runs. | Leave single files alone; use the project's own tools |
| `~/Library/Mobile Documents/com~apple~CloudDocs`, `C:\Users\<you>\OneDrive` | Synced cloud folders | Careful | The file is deleted in the cloud and on your other devices too. | Check which copy is current, then delete in one place |
| `/Volumes/<backup drive>`, `D:\Backup` | A backup copy on another drive | No | You lose your backup. | Keep it: a backup is a planned duplicate |
| `IMG_2041 small.jpg`, `sunset-edit.png` | Similar photos: resized or edited, not identical | Careful | You can lose an edit or the only full-size version. | Compare them side by side; keep the largest |

> **Careful:** Delete copies from your own folders only. Apps, libraries and project folders often hold identical files on purpose, and they need every one.

## How to find duplicate photos with the Photos app

The Photos app finds duplicate photos and videos in its own library. It works on a Mac with macOS 13 Ventura or later and on an iPhone with iOS 16 or later.

On a Mac:

1. Open **Photos**.
2. Click **Duplicates** in the sidebar. In newer versions of Photos, it is in the **Utilities** section.
3. Look at each set and make sure the photos really are the same.
4. Click **Merge** next to a set, or select several sets and click **Merge** at the top.
5. Confirm the merge.

On an iPhone:

1. Open **Photos** and scroll down to **Utilities**.
2. Tap **Duplicates**.
3. Tap **Merge** next to a set, then confirm.

Apple says a merge keeps one photo with the highest quality and the relevant data of the set, and moves the other copies to Recently Deleted. You can recover them from Recently Deleted for a limited time.

If you cannot see the Duplicates album, Photos has not found duplicates yet. Apple notes that this check can take time on a large library.

Windows has no Duplicates album. For photos in `Pictures`, use the checksum steps below.

## How to confirm a copy with a checksum

Two files with the same name can hold different content, for example `IMG_0001.jpg` from two cameras. Two different files can also have the same size by chance. Only the content proves a copy.

A checksum is a long number made from every byte of a file. Identical files always give the same SHA-256 checksum. These commands only read the files.

On a Mac, in Terminal:

```zsh
shasum -a 256 ~/Documents/report.pdf ~/Desktop/report.pdf
```

On Windows, in PowerShell:

```powershell
Get-FileHash -Path "$HOME\Documents\report.pdf", "$HOME\Desktop\report.pdf"
```

If the two checksums are the same, the files are identical and you can delete one. `Get-FileHash` uses SHA-256 by default.

To find every set of identical files in one folder on Windows, run this. It reads every file, so it can take a long time on a large folder:

```powershell
Get-ChildItem -Path "$HOME\Pictures" -File -Recurse |
  Get-FileHash |
  Group-Object -Property Hash |
  Where-Object { $_.Count -gt 1 } |
  ForEach-Object { $_.Group.Path; '' }
```

Each block of paths is one set of identical files. Keep one file from each block.

Do not run a checksum on a OneDrive or iCloud folder with online-only files. Reading a file downloads it, so the check fills your disk instead of freeing it.

## Copies that are not really copies

Three kinds of "duplicate" use no extra space, so deleting them frees little or nothing.

**Hard links.** A hard link is a second name for the same file on the same drive. Microsoft says a file is removed only after all its links are deleted. On a Mac, `ls -li` shows the inode number of each file; two names with the same number are one file:

```zsh
ls -li ~/Documents/report.pdf ~/Desktop/report.pdf
```

On Windows, list every name of a file:

```cmd
fsutil hardlink list C:\Users\<you>\Documents\report.pdf
```

**APFS clones.** On a Mac, a clone is a copy of a file that shares its data with the original on the same volume. Apple says a clone uses no extra space until one of the files changes. Finder makes a clone when you duplicate a file on the same APFS volume, but it shows each clone at its full size.

**Cloud placeholders.** OneDrive and iCloud Drive can keep files online only. Microsoft says a placeholder file uses about 1 KB on the disk. See [how iCloud Drive and OneDrive keep files online only](https://www.kemptdesk.com/guides/icloud-onedrive-free-up-space).

## Decide which copy to keep

Keep the copy that apps and shortcuts use, the one in the folder you work in, and the one with the clearest name. Delete copies in Downloads, on the Desktop and with names such as `(1)`, `copy` or `- Copy`.

Never delete the copy on a backup drive to "clean up", and never thin out files inside an app, a library or a project. If a duplicate is large, check it with [the steps to find large files](https://www.kemptdesk.com/guides/find-large-files-mac-pc) first: one big video often saves more space than a hundred small copies.

## How KemptDesk handles this

KemptDesk's **Duplicates** page compares content, not names, and confirms every match with a full BLAKE3 hash. One copy of each file always stays. The copies are **Your files** (indigo), so nothing is selected until you pick a keep rule: best original, oldest, newest or shortest path. Selected copies go to the Trash or Recycle Bin. KemptDesk leaves out app bundles, photo and music libraries, `~/Library`, AppData, `node_modules` and `.git`, and, by default, hidden files and files under 100 KB. It never reads files that are only in iCloud or OneDrive. **Smart Organize** also finds similar photos in one folder; the photo with the most pixels stays. KemptDesk does not detect hard links or APFS clones.

## Questions

### Does Windows 11 have a duplicate file finder?

No. Windows does not include one. Sort a folder by size in File Explorer to put likely copies next to each other, then confirm them with `Get-FileHash`.

### Is it safe to merge duplicates in the Photos app?

Yes. Apple says Merge keeps the highest-quality version with the relevant data, and it moves the other copies to Recently Deleted, where you can still recover them for a limited time.

### Are two files with the same name and size duplicates?

Not always. Name and size can match by chance. Compare a SHA-256 checksum: if it matches, the content is identical.

### Why did deleting a duplicate not free any space?

The copy may be a hard link, an APFS clone or an online-only placeholder, which use no extra space. Also, files in the Trash or Recycle Bin still use space until you empty it.

### Can I delete duplicate files in app or system folders?

No. Apps and libraries keep identical files on purpose. Remove the whole app instead, or leave the folder alone.

## Sources

- [Remove duplicate photos and videos in Photos on Mac (Photos User Guide)](https://support.apple.com/guide/photos/pht5a3157c1d/mac)
- [Merge duplicate photos and videos on iPhone (iPhone User Guide)](https://support.apple.com/guide/iphone/iph1978d9c23/ios)
- [If you can't find the Duplicates album for duplicate photos and videos on iPhone (Apple Support)](https://support.apple.com/102260)
- [Delete photos and videos or recover deleted ones on Mac (Photos User Guide)](https://support.apple.com/guide/photos/pht3bfab2f96/mac)
- [Work with folders and files in iCloud Drive on Mac (Mac User Guide)](https://support.apple.com/guide/mac-help/mchl1a02d711/mac)
- [About Apple File System (Apple Developer)](https://developer.apple.com/documentation/foundation/about-apple-file-system)
- [ls(1) manual page (Apple open source, file_cmds)](https://github.com/apple-oss-distributions/file_cmds/blob/main/ls/ls.1)
- [Get-FileHash (Microsoft Learn)](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-filehash)
- [Group-Object (Microsoft Learn)](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/group-object)
- [Hard links and junctions (Microsoft Learn)](https://learn.microsoft.com/en-us/windows/win32/fileio/hard-links-and-junctions)
- [fsutil hardlink (Microsoft Learn)](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-hardlink)
- [Build a cloud sync engine that supports placeholder files (Microsoft Learn)](https://learn.microsoft.com/en-us/windows/win32/cfapi/build-a-cloud-file-sync-engine)
- [Save disk space with OneDrive Files On-Demand for Windows (Microsoft Support)](https://support.microsoft.com/office/save-disk-space-with-onedrive-files-on-demand-for-windows-0e6860d3-d9f3-4971-b321-7092438fb38e)
- [SS64: shasum (macOS)](https://ss64.com/mac/shasum.html)
- [Copy, move and clone files in APFS, a primer (The Eclectic Light Company)](https://eclecticlight.co/2020/04/14/copy-move-and-clone-files-in-apfs-a-primer/)
- [Duplicates in Photos for Mac OS Ventura (Apple Community, the question people ask)](https://discussions.apple.com/thread/254460109)
