Script for purging orphaned thumbnails - using in Windows?


I found the bash script for purging orphaned thumbnails. Could someone explain me how to use it with Windows, e.g. with msys? Or is there any other possibility for the Windows version to clean up the darktable database from orphaned thumbnails?

Thank you,

Could you please show us or link to this script?

often installed to /usr/share/darktable/ in packages.

1 Like

Yes, that is the mentioned script. Unfortunately it is a bash script and I have no idea how to use it with Windows. Any hints?

If you edit the library path, cygwin or WSL can probably run it.

OK, I used MSyS and changed the path to DBFILE="/c/Users/[USERNAME]/AppData/Local/darktable/library.db". After installing SQLite via “pacman -S sqlite3” the script ran and finished after app. 30min. Didn’t use the WSL because I don’t want to install a complete Linux just for some scripts and I already had the MSyS for compiling Darktable in WIndows. Thank you all for the tips.

1 Like

I still think an “update database” button somewhere in darktable would be nice as it is requested often. The bash script doesn’t work out of the box in Windows.

Here’s a short how-to to get things working in Win10-64 (no guarantee :slightly_smiling_face: )
assuming a standard install on drive c:\ :

  1. download GIT from and install
  2. download sqlite3 from
  3. unzip the sqlite3 files i.e. to C:\Program Files\Git\mingw64\bin
  4. Edit with an editor (start as admin, otherwise you can’t save!)
    (located in C:\Program Files\darktable\share\darktable\tools):
    (where [USER] is your Windows username)
  5. right-click in C:\Program Files\darktable\share\darktable\tools and run “Git Bash here”
  6. run the script: ./ (start with ./)
1 Like