How to clean up corrupted xmp files
- May 3, 2026
- 3 replies
- 52 views
I’ve got a bit of a weird problem where a subset of ~1.2k photos cannot have their metadata saved. All of them have this badge on their photo in the strip, and when I try to save, I get this error.

Initially, I thought my RAW files might have been corrupted, and something was wrong with the file itself, but I tried opening the raws in two separate programs (XNview MP / DarkTable) and the image opened perfectly in those. That led me to trying out some other things including the ‘Import Setting from Disk’ option that pops up which you click on the ‘metadata error’ icon circled in red above

When Lightroom tried to read these files, it just froze on the ‘Reading XMP Metadata’ step with it never getting any further. This is only a subset of seemingly random photos in my library across the entire history of photos Ive taken 2016-2026. File permissions and all things which could be getting between Lightroom → XMP File are all correct, so that leads me to believe the issue is either with lightroom or the xmp file itself.

Ive attached an XMP file for an image that will not save (with location data scrubbed) but it seems like the file itself is not corrupted basted on testing the xmp in other tools.
Removing the file from Lightroom then Re-Syncing the folder fixes the problem, but then I lose all of my edits. Is there a way I can dump the XMP files is bulk from lightroom then rewrite them based on the metadata stored in Lightroom to fix the issue + preserve edits? Or any other solution Im open to.
