Saturday, August 27, 2011

Once again, a problem with rogue files - now Aperture is acting up

I switched from iPhoto to Aperture when iPhoto stopped removing the deleted photographs from disk, although I tried all kinds of tricks, including cleaning up the iPhoto Library down from 308 GB to less than 95 GB.

But when iPhoto once again stopped removing the deleted photographs from disk, I switched to Aperture, and everything seemed to be fine. But yesterday I noticed that disk space is once again consumed rapidly, and when I investigated I noticed that Aperture Library contained also those files which should have been removed from disk. The "Empty trash" command seemed to do nothing at all.

After searching for a solution on the net I finally resorted to giving Aperture some first aid: I repaired the database.

This took quite a while, and what happened was that all the deleted photographs appeared back in the project where I had deleted them from.

Oh no! Need I do the deletion once again? I tried deleting some photographs, but once again the Empty trash command didn't do anything. Should I leave the mess as it is or not?

Finally I realized that I could use an Aperture vault as a way of cleaning up the library, as Aperture doesn't copy the deleted files there (or so it seems). But first I had to get rid of the once-already-deleted photographs. What to do?

After looking at the metadata of the photographs I realized that I had the Flickr address in the metadata of all those photographs which I had uploaded to Flickr - and that was exactly those files I needed to save. Thanks to Christophe for the help on this. There is also another hint which helped me.

So, after this (and some more manual work) I now have the library in such a state that only the non-deleted files show up. But if I repair the database I'm sure the deleted files will show up once again, as they are still on disk inside Aperture Library.

However, I decided to check out whether there is something else which is causing the problems, from outside Aperture. I looked at the filesystem with Disk First Aid, and everything was in order.

Then I restarted the machine, and started to go through the photographs from today. And - surprise, surprise - Aperture emptied the trash exactly the way it should, and the deleted photographs appeared inside Finder Trash.

Because restarting the machine helped, the reason for the problems may be completely unrelated to Aperture (or iPhoto, for that matter). Or then it was just that the restart kicked Aperture somehow and for a while it behaves... Maybe there are some corrupted photographs which mess up both iPhoto and Aperture. How to know?

I'm getting really fed up with this: too much time spend in front of the computer, for sure!

Now I have all the right photographs showing up inside Aperture, but all those non-deleted ones are still hiding inside Aperture Library. And I'm sure one of these days the deletion will once again start acting up. This is bad!

PS. The photographs above were taken today at the Halkolampi lake in Luukki.


Christophe said...

oops! I just realized that I have the exact same issue here... The good news is that you are not alone...

Juha Haataja said...

@Christophe: Well, I hope there is a cure.

Anyway, after thinking about this for a while, I decided to try once more repairing the database as instructed by Apple. But first I quit Aperture and made a Time Machine backup of Aperture Library. Then I started Aperture up holding the Option and Command keys, selecting Repair Database.

Once again, this took a while, almost an hour. But after this there appeared two new items inside Aperture: Recovered folder which contained Recovered project. And this project had 2070 photographs - all previously deleted but still inside Aperture Library.

I selected all of these, deleted them, and then emptied the trash. And surprise, surprise, the files were moved to Finder Trash. And when I emptied it, I recovered almost 8 GB of disk space.

I also checked inside Aperture Library, and yes, the rogue files were gone. Yes!

Christophe said...

This is really crazy: it seems that onl ythe master doesn't get deleted. All the rest like versions and previews are deleted...

For me, the fix is a bit easier since I'm relocating the master files once I'm happy with the post processing. So, what actually stays in the master directory in Aperture.aplib is what I wanted Aperture to send to the trash.

Anyway, it is really a pity that we have to do something manually...

Juha Haataja said...

@Christophe: Goog to know! Relocating the master files seems to be another way to solve the problem, though not without some manual labor.

Christophe said...

The downside of it is that Aperture vaults do not take care of relocated masters...

Juha Haataja said...

@Christophe: Now that I have learned how to use vaults they seem rather convenient for backing up photographs.

And: I double-checked, and it turned out that the deleted photographs hiding inside Aperture Library were being included into vaults, so this wouldn't have worked as a way of cleaning up.