Slimming your Library

Recently I saw a posting to the Apple-hosted Aperture discussion forums about Aperture Library cruft. Apparently the poster discovered that if you delete referenced images from your Library the Library doesn’t actually get smaller. He had (naturally) assumed that the thumbnail images would be deleted and that the Library would be smaller. Why wasn’t it?

I figured that Aperture was storing thumbnails somewhere in the Library so that is the best place to start looking.

Well, the Aperture Library ‘file’ is actually a special kind of Folder that Finder pretends is a file. If you Control-Click on the icon in Finder you can choose to Show Package Contents. Inside that folder are files and folders that exactly mirror your Aperture layout. The icons that represent your Projects are also file/folder packages and you can open them and you will see some interesting files in there.

Aperture-Library-Project

There are some big files in there, an AP.Thumbnails and an AP.Minis file that combined take up about 100MB of disk space. Spread that out over several dozen projects and you’ll see where a lot of your disk space is going. Apparently Aperture stores all of a Project’s thumbnails in a single (large) file and doesn’t trim that file down when an image is deleted. I don’t delete many images, but I do occasionally move a lot of images between Projects. I wondered if my Library was unnecessarily large.

I wonder what would happen if I deleted those .Thumbnails files, .Minis, and .Tinies files files?

Would Aperture properly regenerate them?

Well, the short answer is yes it will and everything seems to be OK.

My Library with very few Managed Masters and about 400 images with hi-res previews weighed in at 22.63GB. I deleted all of the .Thumbnails files, .Minis, and .Tinies files in my Library.

I launched Aperture and made sure to get it to rebuild all of the thumbnails (All Photos and scroll with the L key). A few hours later my Library was… wait for it… a little longer… 17.92GB.

I saved 4.7GB of space by making Aperture rebuild its thumbnail files.

I use a MacBook Pro. 4.7GB is not an inconsiderable amount of space.

What do you think?

Raw notes below:
Before
================================================================
Total Library size (Get Info): 22.63 GB (24,031,246,819 bytes)
Library.apdb (Get Info): 314.6 MB (329,904,128 bytes)

Totals
----------------------------------------------------
AP.Thumbnails : 17,225,880 KB
AP.Minis      : 3,611,828 KB
AP.Tinies     : 57,860 KB
JPEGs         : 237,672 KB
			  : 218,052 KB
** why 2 totals? **

Deleted Thumbnails, Minies, Tinies
================================================================
Total Library size (Get Info): 2.7GB (2,634,581,366 bytes)

After
================================================================
Total Library size (Get Info): 17.92 GB (18,973,454,530 bytes)
Library.apdb (Get Info): 314.7 MB (329,949,184 bytes)

AP.Thumbnails : 13,035,704 KB
AP.Minis      : 2,769,576 KB
AP.Tinies     : 45,116 KB
JPEGs	      : 237,672 KB
              : 218,052 KB

Notes
================================================================
Calculate size of all files of given extension
	find . -name "*.AVI" -print0 | xargs -0 du -ch

http://wrecking.org/cbd/2007/11/16/unixtrix-calculate-size-of-all-files-of-given-extension/

Delete all files with a given suffix
	find . -name "*.Thumbnails" -delete

Technorati Tags: ,

  • Share/Bookmark