Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

how to remove duplicate photo in iphoto

Hi,


I have a big iphoto library, 13868 items.

Scrolling that library i can see some duplicate photo, how can i find all duplicate photo and remove it?


thanks

iPhone 4, Mac OS X (10.7.5)

Posted on Apr 11, 2013 8:01 AM

Reply
Question marked as Best reply

Posted on Apr 11, 2013 8:03 AM

iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ - has a good duplicate elimination module


LN

37 replies

Jun 17, 2013 9:37 AM in response to fabbro.fabbro

For those who want a free solution and are comfortable in a Unix shell,

here is a sleazy command line that will find and delete dups:


find "$HOME/Pictures/iPhoto Library/Originals" \( -name "*.JPG" -or -name "*.jpg" \) -print0 | xargs -0 md5 -r | \

perl -n -e '@p=split(" ",$_,2);if(exists($m{$p[0]})){print($p[1])}else{$m{$p[0]}=$p[1]}' | \

xargs echo rm


As is, it will just print alot of "rm" statements and not actually toast any files. So spot check a couple of them to make sure it is reasonable, and then remove the "echo" from the last line, run it again (make sure iPhoto is not running). Then go into the iPhoto library dir and mv Data to Data.save, hold down Command + Option and run iPhoto, check all rebuild options, and cross your fingers.


It just does a compare of the underlying image files, and so will not work on edited photos, or e.g. a photo you upload to fb and then dowload again.

Also, only looks for jpegs. If you have other file types just change the ext and rerun.


I wrote a nicer script to do this a while back which allows you to use Preview to spot check files.

If there is interest, I could try to dig it up.

Jun 17, 2013 9:48 AM in response to mikef5555

Have you successfully run this on your library and ended up with a good, working library that accurately represents what photos are in the library? If not then don't suggest it. Because your comment


and cross your fingers.


doesn't instill a lot of confidence in it.


An application that finds and removes duplicate files from iPhoto must also remove edited versions and thumbnail files and edit the database files to reflect the deletions. I'm sure your script will not do that.

Jun 17, 2013 1:42 PM in response to mikef5555

correction: don't move Data out of the way. Just run iPhoto with cmd+option and select "rebuild database"


I tested it on my gf's library with 3600 photos, but no "Modified" photos (and it pruned 180 dups).

As Old Toad notes, this hack wont work if you have photos edited in iPhoto.

And I did not intend to project confidence - this is clearly just a quick hack that might help someone desperate who does not want to pay for the proper solution.

Obviously do a backup first, so of it does not work, you can just restore Pictures/iPhoto\ Library

Aug 28, 2013 4:09 PM in response to fabbro.fabbro

I tried "Duplicate Cleaner For iPhoto.app". It worked really well for me. It seems to scan the images to find the duplicates. I seem to remember getting it off the iTunes app website.

Sep 10, 2013 7:38 AM in response to break7bg

If you do be sure you have a good backup first - there have been reports of CleanMyMac2 destroying iPhoto libraries - I have never used it and personally would not since there are several proven safe and effective programs - IPLM and DA are outstanding, have good support and I suggest sticking with proven, successful products when you photos are involved


If you serach the supporte forums for references ot CleanMyMac2 you will find many complaints and recomendations from experianced users to not use it


LN

Sep 10, 2013 8:35 AM in response to LarryHN

Great advice. I found that CleanMyMac2 provided a way to select the potos you want to delete that are duplicate for whatever reason (perhaps you cropped the pic or your rotated it or you edited it). You cn choose to keep the original, as well. You can perform blanket deletes or individual deletes. It si suprising how much memmory can be freed up by doing this.


But, again, make sure you have a good backup!

Sep 10, 2013 9:24 AM in response to LarryHN

Just ran a test with CMM2 on a test library that had two copies of every photo imported... It doesn't detect duplicate copies that have been imported into the library. It works on portriat photos that get rotated by iPhoto and replaces the original file with the rotated version and then repairs the database. That part works. If you rotate the photo and then edited it, the orignal file will be replaced with the edited version. However, you won't be able to revert to original which defeats the concept of preserving the digital negative.


Personally, I wouldn't use it because it you're not careful you can set it loose on the entire hard drive, including system files, which could have disasterous consequences. And it doesn''t detect true duplicate files.

Sep 10, 2013 12:09 PM in response to Old Toad

It works on portriat photos that get rotated by iPhoto and replaces the original file with the rotated version and then repairs the database. That part works.


And, of course, it's worth pointing out that there is inherent data loss here. What it does is replace the original with the lower quality Preview, and loses significant amounts of metadata along the way.

Jan 25, 2014 10:14 PM in response to Yer_Man

Aw man, OT and TD, I had gotten my hopes up reading this thread for a program that would specifically nix auto-rotated originals, but then you had to go point out several major problems with CMM2 😟 - especially the Preview-quality replacement. How awful! Thanks for saving me there.


Still though - frustration with duplicate auto-rotates continues eating at my soul:


https://discussions.apple.com/thread/5828082

how to remove duplicate photo in iphoto

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.