Removing pictures from library / xmp reset

Hi,
Hi, I’m a new Darktable user and I use it on macOS.
I made the mistake of importing my entire photo library into Darktable, and startup was very slow, so I thought I’d remove everything and re-import only the images from 2025.
The problem is that by doing so, it reset the XMP files in several folders.
Is this a bug?
Is there a way to recover the lost xmp files?

Restore them from your backup and set darktable to look for updated xmp files on start up.

How do you import? There are two options, “add to library” and “copy and import”.
The first leaves the files in place and reads the .xmp files (if present) to populate the database.
Afaik (I never use it), the second makes a copy of the files and ignores the .xmp.

If you already have a photo library in an organisations that fits your style, you can just use “add to database” to import the parts you want to use.

If the xmp files have been overwritten, I’m afraid they are lost (unless you have a backup). If you actually copied the images to a new location, they should still be present

For removing the folders in Lighttable I right clicked on the folder “remove…” and then I accepted to remove the files without deleting on the hard drive.
For re-importing, I used “Add to library…”.
I have to add that while removing the files, Darktable crashed and I had to do a “force quit” from the apple menu.
It’s however scary that the xmp file were somewhat rewritten like it was a first time import. I hope it’s not a standard behaviour.

Unless you have edited all of these photos in darktable the xmp file probably contains nothing of importance (I am willing to be corrected on this if I am wrong). In the preferences I have set my DT to only create xmp files after edit because that is the only time I need the xmp file which is also backed up in the database. The user guide can be very informative about this.

yes, unfortunately they were edited, thats why It’s scary…
It seems to me that everything was trashed and the xmp were replaced.
I have the “look for updated xmp files on startup” checked because i often use Neofinder to rate them and this option allows the two app to be in sync.
Is there a way to check if there was a previous snapshot of the xmp? I see nothing in the darkroom under “snapshot”.