8
\$\begingroup\$

Because of moving or renaming directories the paths to my photos changed. How can I automatically remove all dead links so that the missing photos aren't displayed (marked with a skull) anymore?

skulls

\$\endgroup\$
3
  • \$\begingroup\$ Is deleting the database an acceptable solution, or do you have new rolls added which you don't want to delete? \$\endgroup\$ Oct 17, 2018 at 17:47
  • 1
    \$\begingroup\$ I'm voting to close this question as off-topic because it is about database management, not about taking photographs. There are more appropriate groups on SE to deal with managing databases. \$\endgroup\$
    – Michael C
    Oct 17, 2018 at 20:25
  • 5
    \$\begingroup\$ You are of course right, but unfortunately as long as there is no darktable SE site (my question is darktable specific, not about databases) I think the question is most appropriate on this photography SE. If there arises a new darktable SE on Area 51 I'd like to transfer this question. \$\endgroup\$
    – quiliup
    Oct 18, 2018 at 7:45

3 Answers 3

8
\$\begingroup\$

The darktable project includes a shell script called purge_non_existing_images.sh which will remove any entry pointing to a file which doesn't exist.

It requires an environment that will run a POSIX-compatible "sh" script; on Windows, this may require the installation of such a shell... on Linux, the script itself may or may not be installed along with darktable depending on how it was packaged. Some distributions may provide a "darktable-tools" or similar package for this purpose (there are several other interesting things in the "tools" directory).

\$\endgroup\$
1
  • \$\begingroup\$ The shell script was not included in the darktable packages of my linux distribution but running the script you linked to worked fine. Thank you very much! \$\endgroup\$
    – quiliup
    Oct 18, 2018 at 7:59
1
\$\begingroup\$

If you're using a Snap package, line 9:

DBFILE=$HOME/.config/darktable/library.db

should be replaced with:

DBFILE=$HOME/snap/darktable/current/library.db
\$\endgroup\$
1
\$\begingroup\$

On my machine, if I sort by "id" (top of the lighttable interface) the missing images tend to be clustered together, so you can select them all, then on the right in the "selected image[s]" panel, you can select "remove" to delete the images from the library.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.