cleaning up my Aperture library

July 14, 2009 · 3 comments

in photography

ApertureThumbnailFilesMy Aperture library tends to grow much larger than it should. It seems as though Aperture does not delete the thumbnails for photographs even when deleting the originals, leaving several gigabytes of orphaned kruft behind, accumulating bits, filling up volumes. I delete most of the photos I shoot, so the majority of thumbnails in my library are orphaned. But there’s a quick and easy way to clean it up. After backing up the entire library, I did this (after a blog post by Brett Gross):

First, find out how many petabytes of space have been sucked up on your drive by thumbnails:

find ~/Pictures -name "AP.Thumbnails" -print0 | xargs -0 du -ch
find ~/Pictures -name "AP.Minis" -print0 | xargs -0 du -ch
find ~/Pictures -name "AP.Tinies" -print0 | xargs -0 du -ch

Then, after backing stuff up, this’ll clean out the kruft:

find ~/Pictures -name "AP.Thumbnails" -delete
find ~/Pictures -name "AP.Minis" -delete
find ~/Pictures -name "AP.Tinies" -delete

After running it, Aperture will have to generate new thumbnails for all of the photos in the library – but it won’t generate thumbnails for the photos that were deleted, obviously. On my desktop box at work (with only 4535 photos), this cleared up a couple of GB of space. Thumbnail regeneration took almost an hour. I’ll try it on my home laptop tonight, with over 30,00017,000 photos on it. It’ll probably take several hours to regenerate thumbnails.

Of course, it’d be nicer for Aperture to properly clean up after itself – the whole point of abstracting file management behind the library interface is to make this kind of mundane maintenance stuff unnecessary.

Update: I ran it on my main Aperture library, with 17,371 photos. After letting Aperture rebuild thumbnails overnight, I saved 2GB of disk space from orphaned thumbnails. That may not seem like a lot with today’s gigantor-sized drives, but that’s a LOT of kruft that could have been easily cleaned up by properly removing thumbnails when deleting photos from the library. Leaving them behind to fill up drive space is just lazy and sloppy.

{ 3 comments… read them below or add one }

1 Alan Levine July 14, 2009 at 1:22 pm

Thanks for the tip. I’ve been using Aperture (finally) since June and am so stoked with it. I’ve been storing them all on my laptop, and hopefully one day maybe will load the back archive of a box full of CD/DVDs on an external drive.

This is really useful info; I try to prune as much free space as I can on the MBP.

Reply

2 Gerry July 15, 2009 at 8:23 am

Yes, thanks for pointing this out D’Arcy. For those who are not wanting to venture into Terminal, use Spotlight to find AP.Thumbnails, select and drag to trash. Do the same with the other2 AP. files.

As always make sure your library is backed up before doing this. I accidentally deleted a folder with several projects the other day. Yes the photos end up in the trash and they can easily be imported, but the metadata and adjustments are lost. The fix – import the folder from my SuperDuper backup – all is good.

Reply

3 Alan Levine September 14, 2009 at 10:28 pm

Thanks again- I crunched my library from about 5.6 Gb down to 3.6. I feel slimmer already.

Reply

Leave a Comment

Previous post:

Next post: