MacOS – Remove duplicate photos in photos app in Yosemite

macosphotos

I've accidentally clicked Duplicate Items in context menu after selecting 100+ photos in Photos app in Yosemite. Is there an automatic way to remove the duplicates now? An app that integrates with Photos app and removes duplicates would be fine as well.

Thanks in advance.

Best Answer

Few ways to do that.

I would use the DIY way to make sure it is not deleting unwanted stuff.

Sort by name and decide what to delete.

Use apps like: Duplicate Cleaner For iPhoto

Create Automator workflow (it is not worth the time creating and testing it).

Use Terminal (although not recommend due to possibility of deleting wrong stuff).

Just an example:

Open Terminal from Spotlight or the Utilities folder.

Change to the directory (folder) you want to search from (including sub-folders) using the cd command. At the command prompt type cd for example cd ~/Documents to change directory to your home Documents folder.

At the command prompt, type the following command:

find . -size 20 \! -type d -exec cksum {} \; | sort | tee /tmp/f.tmp \ | cut -f 1,2 -d ' ' | uniq -d | grep -hif /tmp/f.tmp > duplicates.txt

This method uses a simple checksum to determine whether files are identical. The names of duplicate items will be listed in a file named duplicates.txt in the current directory. Open this to view the names of identical files.