Getting Rid of Unwanted Managed JPEGs

by Ellen Anon

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.

33 Comments

Mike
2007-09-25 22:56:48
Hi,


just to let you know that the process can be sped up by not removing and just overwriting. So jut the cp ~/Desktop/emptyjpeg.jpg "$k"


Depending on the shell you work in and settings you might have to use the -f option for cp (to avoid prompting for every overwrite you do)


My 2 cents

Edmund
2007-09-26 00:21:29
Why not use smart album, select all and delete all master and versions?
Michael Martin
2007-09-26 04:35:10
Hi


Is it not just as simple to use Automator for this, or am I missing something?

Ellen Anon
2007-09-26 05:03:44
Mike, thanks for the suggestion to speed up the process. Edmund, unfortunately you can't create a Smart Album based on file types. If you could, removing the JPEGs would be simple. Michael, I think you could create an Automator action that could do this based on the same concept of cropping to a 1 pixel x 1 pixel JPEG, but if you have a way to use Automator to completely remove the JPEGs, please let us know.
Michael Martin
2007-09-26 05:53:24
I suggested Automator for the scaling of images only. Incidently, the smallest size using the 'scale image' option is 2 pixels.
If you want to remove the jpeg files completely, then why not use the star ratings to isolate them. Instead of giving them a star, hit the X button, or 9 on the keyboard, for all the files you want to delete, then use the filter to view only those files with the negative rating, select them all and delete. I realise this could be time consuming if there are hundreds to do, and you would have to check that there were no other negative rated images that you wanted to hang on to.
Ellen Anon
2007-09-26 06:24:19
Michael, the problem is that you can't access just the JPEGs while they exist with the raw managed versions and once you relocate them as referenced files, if you delete the JPEGs you will get an error message when you try to consolidate the raw files back into managed files. Aperture won't do it because it's looking for the JPEGs that you deleted. There are a number of ways you can delete the JPEGs as long as the raw versions remain as referenced files. The issue comes with trying to return them to managed status while keeping all edits, keywords, etc.

2007-09-26 06:28:27
After another look at Aperture, the quickest way to isolate JPG files from all others within a folder or project, managed or otherwise, is to type jpg next to the magnifying glass in the filter box at the top of the browser pane. Then you will only see files with the jpg extension, and can then select all and delete. Of course you could do this with tiff or raw files too. This search can be further refined using the star rating system.
Is this what you want?
Michael Martin
2007-09-26 06:31:17
I forgot to put my name to the last post. Sorry.
Ellen Anon
2007-09-26 06:36:38
Anonymous, this doesn't work for me with images that were initially captured and imported as raw + JPEG versions of the same image, although it does work for filtering file types that were created after import.
Christopher Andrews
2007-09-26 06:44:42
Well, that solution seems overly complex and you are still left with all kinds of now useless references in your library. Given the assumption (and a pretty fair one) that your jpeg files actually have a jpg extension on them, you can easily find them right from within Aperture. Open a search panel and click the little + in the upper right. From the pulldown menu, choose 'Other metadata'. This will give you a new line in the search window. From the new menu choose 'File Name'. For the condition, choose 'ends with' and then type in jpg in the box on the end. Admittedly, this won't work if for some reason you've stripped the extensions off of your files, and there really should be a way to search on kind, but until there is, this should work for most people...
Ellen Anon
2007-09-26 07:04:52
I agree with everything you've said Christopher EXCEPT that when I try to do it this way and delete or reject the JPEG versions, the raw versions go as well. However, you're absolutely correct that you can search for the JPEGs this way. If you can delete just the JPEG versions for images captured as both raw + jpeg, please let me know how you're doing it.
Christopher Andrews
2007-09-26 07:06:56
It would seem the downside of my approach was already discussed when I was typing my comment. Neither of us properly appreciated that Aperture gets clever about Raw+Jpeg combos and hides the second file...
Michael Martin
2007-09-26 07:41:18
Ellen, I never shoot Raw + JPEG, so have not tried to import both. I have just tried it and now understand what it is you are trying to do, so forgive my earlier pointless answers.
I am sure somebody far more clever than me could write a script for this. Not sure why I would want to import Raw + JPEG in the first place though.
Ellen Anon
2007-09-26 07:51:58
Michael, no need to apologize - I understand completely! I haven't shot in Raw + JPEG in years and so I assumed this was going to be an easy question to answer. Last night when I went to write the blog and tested out the procedure I initially thought would work I discovered the hard way that it wasn't nearly as straightforward as it seemed.


Some of the other recent blogs have explained some reasons for shooting in RAW+JPEG - including if you buy a new camera before Aperture supports it. By shooting in RAW + JPEG you can still use Aperture while waiting for raw support.


I appreciate you taking the time to offer thoughts and suggestions. Many brains lead to solutions!

Bill Booz
2007-09-26 08:52:25
Ellen, I am the "someone" who posed the question to Josh and in response to a recent e-mail from me he told we you were working up a response. I certainly didn't a whole blog posting, but how great!! THANK YOU and thanks to all who have posted comments. I am just weeding through them now and can't wait to go home and try some of this out using an external hard drive (not enough room on my built-in MacBook Pro drive to even do step 1!). It really does 'take a village,' doesn't it?
Ellen Anon
2007-09-26 08:58:09
Hi Bill! We're glad to be able to help. And sometimes it does take a village! It was a good question and something that others are likely to encounter, so we felt it worthy of a blog.
Josh Anon
2007-09-26 09:28:07
Folks, two things. When you shoot RAW + JPEG and import from the camera, you CAN'T simply filter out the jpg file in Aperture--it doesn't show up that way because Aperture handles it as a special file type, a Master JPEG. Yes, Automator cropping to a very small size is easier conceptually, but it's slower to run because you have to actually open every JPEG file and do something to it (same with writing a PS action to resize the JPEGs that you apply to a folder of images). This method is faster and accomplishes the same thing. Mike, yeah, you could just do a cp, although you'd probably want:
cp -f ~/Desktop/emptyjpeg.jpg "$k"
and not just cp.


For those who wonder about RAW+JPEG to begin with, check out Derrick's post from earlier this week about dealing with unsupported RAW files in Aperture. Once your RAW file is supported, you'd no longer need to use the master jpeg (yes, if you made adjustments from it, you'll want to apply those to a version from a RAW file before removong the JPG).

Francois Couderc
2007-09-26 12:11:47
hello everybody,


when we import (as managed files) raw+jpg, we only see the raw files.


There is one way to see both the raw and jpg files.


1- create a new empty project


2- DRAG from the finder all the pictures (raw + jpg) you want to import into the new project. VoilĂ , we can now see raw and jpg files.


3- make a smart album and sort by "other metadata/file name-contains-jpg.


4- delete the jpg.


That works for me.

Ellen Anon
2007-09-26 12:26:28
Francois, this method does work, but the problem is that you must do the import this way in order to see both the JPEGs and raw files. Most people who already have JPEGs they no longer need, imported them using the Import dialog in Aperture. So for anyone who is just starting to shoot raw+JPEG because they have a new camera with raw files not yet supported by Aperture, this is a practical way to do the import. (Of course you can't rename the files as easily, etc.) But for those looking to delete the JPEGs that are already there, this won't help. Thanks for a preventative solution!
Bill Booz
2007-09-26 12:36:19
Well, Michael and others, after listening to Derrick's podcast on RAW+JPEG and realizing that I had added more "weight" to my computer than necessary by importing over 1,100 such combos into Aperature, I immediately went to my dSLR and changed the setting - NO MORE JPEGs! Guess I will just have to live with using my set from recent trip to Provence as 'referenced' instead of 'managed.'
Ellen Anon
2007-09-26 13:06:38
Bill, both methods that I describe in my blog will work and will substantially reduce the space taken up by those JPEGs - in fact a 1 x 1 pixel JPEG takes almost no space. So you could keep them as referenced but you could also follow the steps we outlined. They sound more intimidating than what they are. If you don't have space on your desktop to relocate to, you can use an external hard drive - you just feed in the name of the drive instead of Desktop in the appropriate places or create an action in Automator or PS. Alternatively after relocating the files and deleting the JPEGs you could import the raws into a new project. You'd lose all the edits but the files would be managed again. There isn't a perfect solution but there are a lot of choices.
Bagelturf
2007-09-26 13:20:12
I believe I have a better way to achieve this. But first I need to test it more thoroughly and write it up. Check my blog tonight.
Ellen Anon
2007-09-26 14:19:37
Bagelturf, if you do indeed have a better way, it would be great to have you post it right here. We'll look forward to seeing what you come up with. Thanks!
Bagelturf
2007-09-26 17:37:44
Quite a challenge! Here is my method


1. Export the affected project
2. Open the project package
3. Type .JPG into the Finder search box
4. Select all, or just the images you want to remove
5. Press command delete, close the window
6. Reimport the project and clean up


The delightfully illustrated version is posted here:


http://www.bagelturf.com/files/f2152c171c89f2ce02166f0f69bdac17-993.html


Josh Anon
2007-09-26 18:12:42
Good thoughts, but two important points are that unless you pay careful attention to the project structure, you'll end up deleting your previews and such, too. And if you really do have master jpegs that you want (in other words, a mix or RAW+JPEG and JPEGs for your masters), you have to be extra careful not to delete those, too with your method of just searching for JPG files. Yeah, as you point out, you can selectively pick which you delete, but you need to know about Aperture's internal project structure to figure out what to delete. Personally, I think copying and pasting text from a web page to a terminal is easier than figuring out obscure file structures :)


Lastly, your method is great if you have plenty of disk space, but given it requires making 2 full copies of the project (one when you export it and one when you import it back in), giving you a total of 3 copies of the project, well, that can be a lot of space--more than some people have! Using the import project trick I've shared before here, where you just drag it into the library bundle, helps avoid one copy, but you can't avoid making a copy when you export the project.


Thanks for coming up with an alternate solution! I'm sure some people will prefer it to copying and pasting the above lines into a Terminal window.

Ellen Anon
2007-09-26 19:28:20
Thank you Bagelturf for trying to come up with a solution. In addition to Josh's concerns, I want to point out that for those people who are primarily photographers and not computer wizards - which I assume is the bulk of Aperture users - opening up project packages and deleting items can be an invitation to trouble. I favor the Automator or Photoshop solution even though it's slower just because that way I don't tread into unfamiliar, and potentially troublesome, territory. Josh favors the Terminal approach because copying five lines of text is easy and efficient, (and he's a programmer as well as a photographer.) Both aproaches are safer for those not well versed in the inner workings of computer programs. However for those who are comfortable deleting items inside the project packages, your way should work too.
Kim Hill
2007-09-26 22:59:42
What I'd love to do is keep jpegs & delete raw files instead. Often I shoot raw +jpeg just to have raw as a safety net. But if my exposures are good, then for casual snapshots, I have no need for the raw files.


Raw files take up tons of space for no reason in this scenario. Any suggestions?

Francois Couderc
2007-09-27 01:08:54
Kim,


I had the same problem and made a workflow from automator to do this. You can see the explanantion and download the workflow at this adress: http://aperture.fr/Aperture/Automator_01.html


It is in french but google translate can do the job.

Ellen Anon
2007-09-27 04:42:05
Thanks Francois for providing a way for Kim to do this. Francois created a workflow that exports JPEG versions, then deletes the contents of the project and then reimports the exported JPEGs. That way you wind up with a project with only the JPEGs.
Kim Hill
2007-09-28 03:47:25
Just saw this- thanks very much, and I look forward to trying this. C'est bien que je parles un peu francais... ;-)


I don't understand why Aperture & Lightroom don't support this directly. I'd like to always have my raw safety net without being stuck with the raw files forever. I can't believe that this is a rare idea -- what gives?

Kim Hill
2007-09-28 03:52:16
One more thing -- it looks to me as if you have to do this up-front -- before you've rated or adjusted anything. Any metadata you've added will be nuked, I assume.


Sure would be nice to be able to do some adjustments & ratings, and THEN nuke the no-longer-needed raw files, while maintaining metadata. But that would be too logical... :-(

Bill Booz
2007-10-04 05:59:13
Well, I finally had a chance last night to follow Ellen's directions to rid myself of the "evil twin" JPEGs that resided in Aperture for each of my RAW images. It took almost an hour to 'relocate masters' for my 1500+ images from our summer trip - the culprit project that contains the duplicates. However, just to be safe, I relocated them to my larger external hard drive. Then I went through and moved the JPEGs that were duplicates into another folder. Those almost 1,100 JPGs "weighed" almost 4GB!


So, at this point, I still have all of my images showing up in Aperture as referenced images residing on my larger (Lacie) external hard drive. I'm cool with leaving them as referenced, but I want them on my more portable Passport drive since the remaining mix of RAW files and those JPEGs which I shot with no RAW 'twin" still come in at over 14GB and I don't want to take up that space on my laptop hard drive. To accomplish that, I think, "no problem, I'll relocate the masters from the Lacie to the Passport drive." So, this morning, that's what I did. I got the message that not all images could be relocated, but I figured, no biggy, I'm sure it is just a few and pushed ahead.


When the process finished and I went to the "Manage Referenced Masters" window, I discovered that all of the JPEGs (that is, those that had had NO matching RAW version; ones I had shot in 'Auto' mode) had been relocated to the Passport drive, but the RAW image files (extension: CR2) remained on the Lacie!!


Hmmmm? Why did this happen? I am guessing it is because I had removed the JPEGs for those CR2 (RAW) files. Do you think that is the reason? Do you think if I follow the steps you outlined, Ellen, to create tiny versions of the "twin" JPEGs and move those smaller versions back in the folder with their CR2 brothers and sisters, I will be able to relocate all of the RAWs and their corresponding, tiny JPEGs to my Passport drive? Even though I am not trying to use the images as 'managed images,' I am thinking the relocation process is reacting just as the 'consolidate masters' process does. Make sense?

Josh Anon
2007-10-05 09:29:57
Bill, I think you're right that the issue is that you moved the JPG files separately from the RAW files. As we mentioned in the article, Aperture really wants to keep the two of them together. I believe you'll be ok if you relocate everything back to the same folder and then follow the above steps to basically make the jpg files be empty, tiny files. Good luck!