Two weeks ago, someone posed a seemingly straightforward question to Josh’s blog; he asked how to remove unwanted JPEG files if you have managed projects that contain both RAW and JPEG versions but no longer need the JPEG files. Obviously the JPEGs are taking up considerable storage space, and if they’re unneeded, it would be nice to get rid of them.

Neither of us thought this would be too challenging at first. But it turns out that it’s a bit more difficult than you would guess. Of course two brains working together did come up with some solutions. So this week you’re getting the best of Ellen and Josh together!

To begin, in Aperture, go to File > Relocate Masters and move the files to a folder on your desktop. We want to move the JPEG files somewhere that we can easily access them. If you are content to leave your files as Referenced files, all you need to do is go into Finder and navigate to the folder. Then go to View > as Icons >Arrange By >Kind. All the JPEGs will be together and you can drag them to the trash. The problem is that doing this will prevent you from ever making them managed files again because Aperture will complain about the missing JPEGs. You could import the remaining raw files into a new project, but you would lose all your keywords, ratings, edits, etc.

If you want them as Managed files Josh created a work around. The basic idea is that we will make the JPEG files as small as possible so that they don’t waste disk space yet still exist so that Aperture will be willing to manage them. (As a side note, you could do some trickery to mess with your Aperture library files, but we feel that this method is safer.)

To begin go into Photoshop and create a new file that’s 1 pixel by 1 pixel (the smallest possible file you can make), name it (I used emptyjpeg), and save it to the desktop as a jpeg file. Make very careful note of what you call the file, including capitalization. You’re going to replace all the JPEGs in your folder with these tiny JPEGs. To do this open up the Terminal (Applications > Utilities > Terminal). You must type the following steps precisely including spaces and each step is case sensitive as well. There is a difference between emptyjpeg.JPG and emptyjpeg.jpg. I’ve indicated when to hit return.

/bin/tcsh

Hit return

cd

Don’t hit return yet!

(Note that there’s a space after the “cd”). Now drag and drop the folder containing your raw and JPEG files into the terminal. Your shell will display something like: cd /Users/ellenanon/Desktop/Masters/RawJpeg/

Hit return, then type:

foreach k (*.JPG)
rm “$k”; cp ~/Desktop/emptyjpeg.jpg “$k”
end

(Hit return after each of the previous lines as you enter it. Note that if your files are .jpg, .jpeg, or JPEG, that’s what you would type in the “foreach k” line.)

If you look in the folder you’ll see that the raw files are unchanged but the JPEG files are all 1-pixel, very tiny files.

Return to Aperture and go to File > Consolidate Masters. This time it will work because the JPEG files are still there. The difference is that they’re tiny and take up almost no hard drive space.

A major thank-you to Josh for coming up with the work-around!

If you are not comfortable using the Terminal, another approach to do the same thing is to create a Droplet in Photoshop to crop each JPEG to a 1 pixel X 1pixel image and save it. (Droplets are essentially actions that can be stored on your desktop - or elsewhere - and then run on a folder. ) If you choose this approach, after you initially relocate your masters and sort them into raws and JPEGs, create a new temporary folder for the JPEGs and drag them into it. Run the cropping droplet on the JPEG folder, then open the folder and drag the tiny JPEGs back into the original folder. Delete the temporary folder. In Aperture you can then consolidate the masters back into the library as managed files.

If anyone has another solution, we’d love to hear it!