I was getting the following error when trying to update Omarchy from a fresh install:
Update system packages
:: Synchronizing package databases...
error: failed to synchronize all databases (unable to lock database)
Something went wrong during the update!
Please review the output above carefully, correct the error, and retry the update.
If you need assistance, get help from the community at https://omarchy.org/discord
DeepSeek V4 Pro found the issue and fixed it:
Here's what happened and what I did:
- Diagnosed the cause — unable to lock database means pacman thinks another package operation is already running. It checks for a lock file at /var/lib/pacman/db.lck.
- Confirmed it was stale — I checked for any running pacman process (pgrep pacman) and found none, and fuser confirmed no process actually held the lock. The lock file was dated Sep 8 — leftover from an update that got interrupted (e.g. a crash, reboot, or killed terminal) and never cleaned up.
- Removed the stale lock — I deleted the orphaned file with:
pkexec rm -f /var/lib/pacman/db.lck
(Used pkexec because removing it requires root, and my shell had no terminal to prompt for a sudo password.)
Since the lock file was just orphaned garbage and nothing was actually running, deleting it was safe and let pacman proceed normally.
If it ever happens again, the quick fix is simply:
sudo rm -f /var/lib/pacman/db.lck
— but only after confirming no update/pacman process is actually running (otherwise you could corrupt the database).
I was getting the following error when trying to update Omarchy from a fresh install:
DeepSeek V4 Pro found the issue and fixed it:
Here's what happened and what I did:
pkexec rm -f /var/lib/pacman/db.lck
(Used pkexec because removing it requires root, and my shell had no terminal to prompt for a sudo password.)
Since the lock file was just orphaned garbage and nothing was actually running, deleting it was safe and let pacman proceed normally.
If it ever happens again, the quick fix is simply:
sudo rm -f /var/lib/pacman/db.lck
— but only after confirming no update/pacman process is actually running (otherwise you could corrupt the database).