Updates are failing and I cannot get rid of /var/lib/dpkg/lock-frontend

8 posts / 0 new
Last post
#1 Fri, 10/25/2019 - 14:37

Updates are failing and I cannot get rid of /var/lib/dpkg/lock-frontend


I am having a problem updating any packages (latest Debian) using virtualmin I get:

dpkg: status database area is locked by another process E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

.. install failed!

I tried using webmin 'File Manager' to delete the file but I am getting this:

Following errors occured while performing operation lock-frontend - unable to delete: No such file or directory

Which is strange since I can select the file using the 'File Manager' so it exists for sure.

Is there a way (virtualmin/webmin) to remove that file without having to login to the linux console to do it?

Note that I am not running anything special so I have no idea why the file is locked in the first place.

I also tried editing the file and adding a '1' in it and I could save the file using 'File Manager'.

So does it make sense that 'File Manager' can open/edit/save a file but cannot delete it?

Sun, 10/27/2019 - 19:03


Mon, 10/28/2019 - 10:46
Mon, 10/28/2019 - 12:11

I'm on Ubuntu, but I get similar error upon a reboot when either the webmin update check is running or when the OS auto update check is going. Not sure which process is responsible for it. But after waiting several minutes for it to complete I can then do my own 'apt update', 'apt upgrade' with no problems. Sounds like something is running the OS update process in the background. Which is normal, but it should complete on its own after a few minutes.

Mon, 10/28/2019 - 12:26 (Reply to #4)

Did you try one or both methods shown in that link and find the PID & kill it?

Mon, 10/28/2019 - 14:34

All the O.P needs now guys is a guide on how to achieve this in the Virtualmin GUI without using command shell

"Is there a way (virtualmin/webmin) to remove that file without having to login to the linux console to do it?"

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin


Mon, 10/28/2019 - 15:42 (Reply to #6)

I think (unfortunately) the O.P is going to be waiting perhaps a long time. Virtualmin can do a lot of things, but it doesn't do everything. And I am not sure the devs are gonna go down the road of "it does everything".

An updating process (most likely) has created a lock file and then died - blocking all other updates from proceeding. Sadly - the O.P will have to go "under the hood". I'll kind of stick my neck out and say there is no way in the GUI to do it.

Not ideal perhaps - if a person is running a Linux server (VPS or otherwise) a GUI like Virtualmin is great at doing many things but it WILL NOT remove the need to (once in a blue moon or more frequently) to have do things by hand.

My 2c worth.


Wed, 11/27/2019 - 22:34

I am having the same sort of problems. Cannot do any updates. Running Ubuntu 18.04. There was a failed upgrade to mysql because of a thread_stack size too small. Since then have not been able to do any updates. Have deleted 4 or 5 different lock files using sudo rm and also with File Manager. Have terminated processes in Running Processes. Have searched and searched for solutions. Have tried many different things with apt and dpkg. All to no effect whatsoever. Apart from a whole list of security updates that need doing the system is running fine.

Topic locked