MAC HOW-TO

How to clean up leftover RAW and JPEG files on a Mac without upsetting Lightroom

Updated

Short answer

Clean up before you import. Lightroom keeps its own list of every photo, so a file that’s moved or deleted behind its back shows as missing. Until the photos are imported, nothing is tracking them and a cleanup can’t break anything: cull, find the leftover twins, move them to a review folder, look once more, and only then import. If the photos are already in a catalog, remove them from inside Lightroom instead. Either way, move files to a folder first and delete later.

The safe order

What to do before and after importing into Lightroom
Where you areDo thisNot this
Photos still on the card or just copiedCopy the card, keep the card as it is, then cull and clean up the copyClean up the card itself
Culled, not imported yetMove the leftover twins to a review folder, then import what’s leftImport first and tidy up in Finder later
Already in a Lightroom catalogRemove them from inside Lightroom, so its list and the disk agreeMove or delete the files in Finder or any other app, this one included
Moved files by mistake and they show as missingPut them back in the same place with the same namesRemove the missing photos from the catalog: their edits can go with them
In the Photos appRemove them in PhotosTouch the files inside the Photos library

The free ways

Free: side by side in Finder

  1. Open the folder in Finder as a list and sort by Name. A RAW and its JPEG share a name, so they sit next to each other.
  2. Look for a RAW with no JPEG beside it (you culled the JPEGs), or a JPEG with no RAW (you culled the RAWs).
  3. Make a folder called Review on the same drive and drag the leftovers there, with their XMP files if they have any.
  4. Look through Review once more before you delete anything.

Free: list them in Terminal

This only prints names. It moves and deletes nothing.

  1. In Terminal, type cd (with a space), drag the folder onto the window and press Return.
  2. Paste the line below. It prints every RAW that has no JPEG. Change CR3 to your camera’s RAW ending (NEF, ARW, RAF, DNG) and JPG to JPEG or HEIC if yours are named that way.
  3. To find JPEGs with no RAW, swap the two endings.
for f in *.CR3; do [ -e "${f%.*}.JPG" ] || echo "$f"; done

It checks one folder and matches exact names, so an edited copy such as IMG_1234-Edit.JPG doesn’t count as the twin of IMG_1234.CR3.

Where the free ways stop

  • Finder works for one small folder; it gets slow and error-prone over a year of shoots.
  • The Terminal line misses renamed and edited copies, so a file you kept can look like a leftover.
  • Sidecar files (XMP, PP3, DOP and others) that hold your edits have to be moved along with their photo by hand.
  • Nothing puts the files back if you move the wrong ones.

How Pairtrim does it

Pairtrim is a Mac app we make: clean up the RAW and JPEG leftovers after you cull a shoot.

  1. Drop a folder of shoots on Pairtrim. It lists RAW files whose JPEG or HEIC is gone, JPEGs whose RAW is gone, and sidecars whose photo is gone, with thumbnails. The scan and report are free.
  2. Edited copies count as the JPEG, and bursts never cross-match. Nothing is ticked until you choose.
  3. A dry run shows the counts, sidecars and sizes before anything moves. It’s free too.
  4. With a license key, ticked files move to a Pairtrim Review folder inside the folder you scanned, keeping their subfolders, with a restore log. It never deletes a file, and Restore puts them back.
  5. It refuses Photos libraries and folders that hold a Lightroom or Capture One catalog, and warns that photos a catalog knows about will show as missing there.
The overview of a made-up Photos 2026 folder: 7 RAW files without a JPEG, 3 JPEGs without a RAW and 3 orphaned sidecars
The dry run before a move: 12 files, their sidecars and sizes, moving to the Pairtrim Review folder

Free to use without a key: the full scan and report for any folder, the dry run and Restore. Moving files to the review folder needs a key.

$9.99 one-time for Pro, no subscription. Buy a license key to unlock Pro: any number of files, and pairing by capture time.

macOS 14 Sonoma or later. Apple silicon and Intel. Works on folders of files, not the Photos library; if Lightroom or Capture One knows about the photos, moved files will show as missing there.

Questions

Will Pairtrim break my Lightroom catalog?

It never opens or changes a catalog, and it refuses a folder that holds one. But it can’t know that a catalog stored somewhere else lists the photos. If one does, moved files show as missing there until you restore them, so run it before you import.

I already moved files and Lightroom shows them as missing. What now?

Put them back where they were, with the same names. In Pairtrim, open Restore and restore that session. Don’t remove the missing photos from the catalog first: that can take their edits with it.

Where do I click in Lightroom to remove photos?

The menus differ between Lightroom versions, so follow the help for yours. What matters is that the removal is done there, not in Finder.

Should I keep the RAW or the JPEG?

That’s up to you, and the reason nothing is ticked for you. The RAW holds more to edit; the JPEG is what the camera made and is much smaller.