Skip to content

Instantly share code, notes, and snippets.

@codedeep79
Created January 23, 2023 08:58
Show Gist options
  • Save codedeep79/1e9aa89f8eb5e23d144d604594d9eecb to your computer and use it in GitHub Desktop.
Save codedeep79/1e9aa89f8eb5e23d144d604594d9eecb to your computer and use it in GitHub Desktop.
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)

This may happen if:

  • 'Synaptic Package Manager' or 'Software Updater' is open.
  • Some apt command is running in Terminal.
  • Some apt process is running in background.

For above wait for the process to complete. If this does not happen run in terminal:

sudo killall apt apt-get

If none of the above works, remove the lock files. Run in terminal:

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock*

then reconfigure the packages. Run in terminal:

sudo dpkg --configure -a

and

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