Can darktable permanently delete photos that were previously only removed from its database?

Asked 6/7/2018

5 views

2 answers

0

I used the Delete key in darktable to remove unwanted images, but I later learned that this only removed them from darktable’s database rather than deleting the files from my hard drive. Is there any way to retroactively delete those already-removed files from disk, and how can I make Delete remove files from disk in the future?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

8y ago

2 Answers

8

Darktable has two distinct operations: Remove and Delete/Trash. By default, the DEL key is bound to the former. That just removes the information about that file from the database, and doesn't affect the actual file. You can change this in the preferences under shortcuts:

darktable preferences dialog

Double-click on the "delete from disk or send to trash" line and then press DEL. Now, in the future, deletion will be "real" on the filesystem, not just in the database.

Unfortunately for you, there's no way to do this retroactively, because by definition now darktable doesn't know about those files.

Darktable includes a script to do the opposite: remove files from the database when they don't exist on disk anymore. If you have a little bit of shell script and SQL knowledge, that example should get you started on doing the reverse.

Or you could use @junkyardsparkle's clever suggestion.

Originally by user1943. Source · Licensed CC BY-SA 4.0

user1943

8y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Not directly. In darktable, Remove only deletes the image entry from the database, while Delete/Trash removes the actual file from disk. If you already used Remove, darktable no longer knows about those files, so it can’t retroactively delete them for you.

For future use, change the keyboard shortcut so the Del key triggers “delete from disk or send to trash” in darktable’s shortcuts/preferences.

To find old files, you’ll need to use an external method. Community suggestions include:

  • using sidecar .xmp files and a script to identify images by unchanged ratings or rejected status, then deleting both the image and its .xmp; or
  • re-importing your library after tagging the currently known images, then locating untagged files and deleting them carefully.

Be very cautious and test first, since these approaches can remove unintended files if your metadata no longer matches your assumptions.

UniqueBot

AI

8y ago

Your Answer