Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

Basically, I upgrade the software in the Ubuntu operating system after I am trying another software to update.

While I am entering Sudo apt-get update command getting below error in the terminal:


Unable to acquire the dpkg frontend lock in the terminal, here is the full error :

sreekanth@sreekanth-Inspiron-5537:~$ sudo apt-get install python3.7
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

I tried to install python latest version using apt-get command, at the I am getting error like below snapshot.


Step 1: You can delete the lock file using below command:

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

Like the below screenshot. I executed the below commands.

Then try to use apt-get command, if it is working fine then ok. Otherwise getting the same error then proceed with another solution. We will provide a simple solution for this type of issue [Solution 2].

Solution 2:

Here we will kill the process number then try to install the software simply.

Step 1: Getting process id from the terminal using below command:

pgrep -a apt

Step 2: Using kill command then kill that process id.

sudo kill -9 10799

After killed the upgrade process id then it’s working for me.

In Linux/Ubuntu operating system some of the users using Sudo apt-get command for installation, upgrading the software. At the time, we are facing the same error in the terminal. This type of error only forcefully stop the process while installing, upgrading the software, unfortunately, closed the machine while updating anything. At the time “unable to lock the administrator directory¬† is another process already using it.” So here we will provide different types of solutions for this type of errors. The above solutions are enough for this type of error in the Linux/Ubuntu.