How to reset or check database?

Hi there,

yesterday my darktable stuck a bit and instead of deleting only selected images it decided to move the whole library into the trash. Luckily the images aren’t lost.

I found several database files in the ~/.config/ folder: data.db, data.db-pre-3.0.0, data.db-pre-3.0.1 and corresponding ‘library’ files to all three. Can I simply delete these to start with a fresh, empty library and import to images again? Or is there any internal check resp. repair function I could run? And what would happen if I delete the whole darktable folder in ~/.config?

If you still have the side .xmp files you won’t lose your edits. But if you delete data.db you will lose your module presets and custom styles, among other things.

2 Likes

pre-3.0.0 are backups of your databases, created when you moved from dt 2.6 or 2.7 to 3.0.0
pre-3.0.1 are backups of your databases, created when you moved from dt 3.0.0 to 3.0.1
They only serve for security when you update dt and something goes wrong. They are no longer used by dt when it is starting.
If you delete the whole folder you will also loose all your settings in darktablerc. The edits are saved in library.db.

.

That’s what I did in the end: deleting the whole folder and darktable created a fresh library.