// 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
Share

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

  1. FIX 1Check no darktable is running

    1. 01Open Task Manager / Activity Monitor / run ps aux | grep darktable
    2. 02End any darktable process
    Did this fix it?
  2. FIX 2Delete stale lock files

    1. 01Open the config folder (~/.config/darktable on Linux, %LOCALAPPDATA%\darktable on Windows)
    2. 02Delete data.db.lock and library.db.lock
    3. 03Restart darktable
    Did this fix it?
  3. FIX 3Restore a snapshot if the database is corrupted

    1. 01Find library.db-snp-* backups in the config folder
    2. 02Copy a recent one over library.db after backing up the current file
    Did this fix it?
  4. FIX 4For darktable-cli use separate config dirs

    1. 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 us

Watch darktable Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

The same problem in other apps

All plan limits, paywalls & watermarks guides →

Other darktable errors

All 12 darktable errors and fixes →