Depflush

Guide · Duplicates

Find duplicate photos and videos on a Mac for free

The same holiday photos in Downloads and Pictures, a screen recording copied to the Desktop, a video exported twice. Duplicates live in two different places on a Mac, and each needs its own approach.

Inside the Photos library: use Photos

Since macOS Ventura, Photos finds duplicates in its own library. Open Photos and choose Duplicates below Utilities in the sidebar. Merge keeps one original where the duplicates were; the others go to Recently Deleted, where you can recover them for 30 days.

Never delete files directly inside the Photos Library.photoslibrary package in Finder. It is a database, and removing files there damages the library.

Outside Photos: identical files in your folders

Downloads, Desktop, Documents, Pictures and Movies often hold copies of the same file under different names, such as IMG_2041 (1).HEIC or video copy.mov. Two files are true duplicates only if their content is identical byte for byte; the same name or the same size is not enough.

From the Terminal you can group files by content. This prints each group of identical files larger than 1 MB in Pictures, Downloads and Desktop, separated by a blank line:

find ~/Pictures ~/Downloads ~/Desktop -type f -size +1M \
  -not -path "*.photoslibrary/*" -exec shasum -a 256 {} + \
  | awk '{h=$1; sub(/^[^ ]+  /,""); n[h]++; f[h]=f[h] "  " $0 "\n"}
         END {for (h in n) if (n[h]>1) printf "%s\n", f[h]}'

It reads every file, so it takes a while on large folders. Keep one file of each group, preferably the one in Pictures or Movies, and move the others to the Trash.

Two traps: “duplicates” that take no space

The same, with a preview

Depflush compares photos and videos in Pictures, Movies, Documents, Desktop and Downloads byte for byte, keeps one original per group and only removes a copy while that original is still there. It skips the Photos library, the working folders of apps such as CapCut or Final Cut, iCloud files that are not downloaded and APFS clones, and shows how much space each copy really frees. It is free and open source.

Source: Apple Support: Remove duplicate photos and videos on Mac.