Categories: debianUbuntu

[SOLVED] E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

You get the following error message while installing a .deb package on Debian or Ubuntu or while installing Updates?

E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

This error means that there is already an apt process running or the apt process dies and left his lock file.

Solution

First, you should wait a few minutes to ensure that the lock has not been set by the automatic update job (in case you enabled automatic updates on your system). If you just run an apt command and this command ended abruptly e.g. due to a disconnect of your SSH session, then there is no need to wait.

Sponsored

When the same error still shows up after you waited some time, then it’s time to fix the issue by removing the stale apt lock file.

Sponsored

Run this command to remove the lock file:

sudo rm -f /var/lib/dpkg/lock

Now you should be able to run the original apt command successfully.

The post [SOLVED] E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? appeared first on FAQforge.

Ubuntu Server Admin

Recent Posts

Canonical Releases Ubuntu 25.04 Plucky Puffin

The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…

2 days ago

Ubuntu 25.04 (Plucky Puffin) Released

Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…

3 days ago

Extended Security Maintenance for Ubuntu 20.04 (Focal Fossa) begins May 29, 2025

Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…

3 days ago

Ubuntu 20.04 LTS End Of Life – activate ESM to keep your fleet of devices secure and operational

Focal Fossa will reach the End of Standard Support in May 2025, also known as…

4 days ago

Ubuntu MATE 25.04 Release Notes

Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…

4 days ago

Ubuntu Weekly Newsletter Issue 887

Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…

6 days ago