// troubleshooting guide · darktable
darktable Database Locked Error
- Status
- Fixed in latest version
- platforms:
- Windows, macOS, Linux
- updated:
- November 17, 2026
- reports:
- 3
- Method
- how we research
RUNBOOK · darktable/database-locked4 FIXES
// quick answer
'Database is locked' means stale lock files remain from a crash or another darktable process is using the library. Close darktable and delete data.db.lock and library.db.lock only when no darktable process is running.
Most likely fix: Check no darktable is running
How to fix it
// try these in order, the most common fix is first
FIX 1Check no darktable is running
- 01Open Task Manager / Activity Monitor / run ps aux | grep darktable
- 02End any darktable process
Did this fix it?FIX 2Delete stale lock files
- 01Open the config folder (~/.config/darktable on Linux, %LOCALAPPDATA%\darktable on Windows)
- 02Delete data.db.lock and library.db.lock
- 03Restart darktable
Did this fix it?FIX 3Restore a snapshot if the database is corrupted
- 01Find library.db-snp-* backups in the config folder
- 02Copy a recent one over library.db after backing up the current file
Did this fix it?FIX 4For darktable-cli use separate config dirs
- 01Run each job with --configdir and --library :memory:
Did this fix it?
SANDBOX · darktable RUNS IN YOUR BROWSER
Try it: edit a layered image, paint, generate and export it
A hands-on darktable-style sandbox, including the spots where users get stuck. See where problems like this one start. 1-2 minutes, nothing is saved.
Symptoms
darktable shows 'the database lock file contains a pid that seems to be alive' or 'error locking database' and exits.
Why it happens
- C-01Previous crash or power failure left lock files
- C-02Another darktable or darktable-cli instance
- C-03Library on a network share
// this guide also covers
- darktable database locked
- darktable error locking database
- darktable cannot open database
Still not working?
If darktable keeps failing, you're not alone. See every darktable problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to usThe same problem in other apps
All plan limits, paywalls & watermarks guides →
Capture One Activation Limit Exceeded (Capture One)