I've excepted my Aperture library from TimeMachine and over the weekend I was making sure to back up my Aperture library to a few places. In the process I managed to duplicate my image folder by a factor of four. Yep. It went from 8,000 images to 32,000 images. When I looked in the folder I saw things like this.
Dave running with scissors
Dave running with scissors (1)
Dave running with scissors (2)
Dave running with scissors (3)
I'm pretty certain this was my own doing and not Apertures but it left me with a trick problem of how to get rid of all those extra copies. I certainly wasn't going to do it by hand for 8,000 photos. I started thinking about some fancy Automator or Applescript action but then I remembered that Aperture has an "Move Master" command. I ran it putting the masters in a new location. That essentially rebuilt the 8,000 photo folder making it possible for me to simply delete the bloated folder.