Skip to main content
Participating Frequently
September 19, 2012
Question

How do I delete the jpeg from raw+jpeg imported images?

  • September 19, 2012
  • 4 replies
  • 53713 views

Hi,

Back in the day, I shot lots of images using raw+jpeg and imported them into Lightroom.  Now I realize those jpegs add no value and I'd like to recover the disk space that they're collectively occupying.

Is there a good way to:

1. Identify all images in a catalog which have raw+jpeg?

2. Remove just the jpeg for these images?

Thanks!

This topic has been closed for replies.

4 replies

Participant
September 26, 2023

this theng is on my cumputer please take it off

 

Participant
July 28, 2019

I've figured it out using only Lightroom (CC - 2019)

My workflow is usually:

Go through the photos of the session, rate some of them in RAW (it's better to have them grouped for this purpose), edit as appropriate, export as JPEG etc.  Now I want to delete the other RAW's that I don't feel are necessary to keep (let the stoning begin), so I go through the below process to get them deleted:

  1. If you've already got photos you would like to separate out, click on Preferences > Tick "Treat JPEG Files next to RAW files as separate photos"
  2. Then right click on the folder you want to work with, and click "Syncronise folder" - it will ask you to reimport your files, click yes.
  3. Now create a filter with the following settings
  4. Attribute > Click on "Date" > Select Raw
  5. Modify the 2nd column to use Rating and select a Rating that's appropriate
  6. Modify the 3rd column to use "Edit" and select "Unedited"
  7. This should now give you all the files in the folder that are RAW, haven't been worked on, and have a high rating.
  8. Save this filter as a preset filter for next time

Hope this helps someone!

Known Participant
December 22, 2012

Perhaps someone is helped, although this discussion is old...

Recently at www.lightroomstatistics.com they have posted a report query called "Find RAW + JPG photos.  The result of the report can be stored in a CSV file.

Behind the report there is a SQL query. One could also get the same result with querying the database directly.

Further they have a Lightroom plug-in called "Photo list importer". This plug-in reads a CSV file and adds all photos in the list in a collection called "LRS_Photo_List.

Before running the report you should close Lightroom.

The report won't run because Lightroom locks the database.

My advise, create a copy of your catalog and test it first on that. When you are happy go ahead.

DON'T FORGET, ALWAYS MAKE A BACKUP BEFORE RUNNING SUCH REPORTS.

Participant
December 30, 2012

If you have a Mac or Linux workstation, the following script should do the trick.  It searches a directory tree for Canon (CR2) and Sony (ARW) raw files (tweak however you like), checks for sidecar JPEG files, and deletes them if they exist.  After running the script, you then need to synchronize in LR to remove the sidecar file flag from your files.

Apologies if someone else posted a script or solution already.  I didn't read the entire thread.

#!/bin/bash

root=~/Pictures

for f in $(find $root -name '*.CR2' -or -name '*.ARW');

do

  fname=`echo $f | cut -d\. -f1`

  if [ -e $fname.jpg ]

  then

    rm $fname.jpg

  elif [ -e $fname.JPG ]

  then

    rm $fname.JPG

  elif [ -e $fname.jpeg ]

  then

    rm $fname.jpeg

  elif [ -e $fname.JPEG ]

  then

    rm $fname.JPEG

  fi

done

Participating Frequently
July 18, 2018

The script assumes no spaces in file names. Running this with files (or paths) having spaces will possibly wreck havoc if the words match other files.

Properly using quotes at least with rm commands should avoid this.

Victoria Bampton LR Queen
Community Expert
Community Expert
September 19, 2012

Yes, there is a way - sort of - but back up your catalog and photos first, just in case you make a mistake.  You may even want to work on a duplicate of your catalog, which you can delete when you've finished.

Go to preferences and confirm that the 'treat them separately' checkbox is unchecked so that they're imported as sidecar files, as they are at the moment.

Run an import on all of the folders, just to double check you've got all unique photos imported already.

Put all of the current photos in a collection so you can easily identify them if you make a mistake.

Go to preferences and check the 'treat them separately' checkbox so that it'll import the JPEGs separately in the next step.

Now go back and import the same folders, and it'll pull in all of the JPEGs as separate photos.

They should all be in Previous Import.  What you do at this point depends on how certain you are that the newly imported photos are just the raw+jpeg JPEGs.  You might select all and delete them, or you might choose to mark them with a colour label so you can skim through All Photographs and double check before deleting.

Obviously it's not quite as clean cut a solution as you might like, but it works.

Victoria - The Lightroom Queen
Participating Frequently
September 20, 2012

Hi Victoria,

First, thanks very much for taking the time to answer my question. The approach you're suggesting should (hopefully) work but it's one heck of a hack so I'm a bit reluctant to do it.  I need to be 100% confident that I won't be accidentally erasing any jpegs for which there are no corresponding raw files (I have some jpegs without raws from cameras which can't shoot raw).  The thing that gets me is that LR already allows you to search for images based on file type, (but not raw+jpeg today).  It seems that it would be a useful feature to be able to search for raw+jpeg and then filter out raw (or jpeg) from the selection so that you could erase / process / do whatever you need with the selection.  Maybe something for LR5?

Sean

Inspiring
September 20, 2012

Filter the previous import collection of jpgs for camera, and select NOT the cameras which do not save raw format.

Then you can be sure that you do not accidentally delete one of those w/o a corresponding raw.

Cornelia