Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save codedeep79/637067eff4d98d2bd9fb346769a6e661 to your computer and use it in GitHub Desktop.

Select an option

Save codedeep79/637067eff4d98d2bd9fb346769a6e661 to your computer and use it in GitHub Desktop.
dpkg: error: dpkg status database is locked by another process (Debian, Ubuntu)

There are several lock files that might need to be removed:

sudo rm /var/lib/dpkg/lock
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/cache/apt/archives/lock

Then you can fix dpkg as suggested:

sudo apt update
sudo dpkg --configure -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment