1

I am running Debian buster a.k.a. Debian testing. From the last couple of weeks, whenever I reboot the sytem i.e. going to CTRL+ALT+F1 and run

$ sudo reboot

it reboots the systems as normally but when it comees to on the desktop after logging in, I always get -

$ sudo aptitude autoclean
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?
Freed 0 B of disk space       

and I have to wait around 5 minutes before I can run the command. It can't be memory or system constraints as free shows -

$ free -h
              total        used        free      shared  buff/cache   available
Mem:           7.7G        634M        6.3G         94M        726M        6.8G
Swap:           59G          0B         59G

and can't be the chip as it's a pretty new Skylake i5 5400

3

See what process has the file open with lsof /var/lib/dpkg/lock or fuser /var/lib/dpkg/lock.

Chances are that it's the apt-daily service, which normally runs once a day to run apt-get update and notify the user of available updates. If you don't like this, see How to disable `apt-daily.service` on Ubuntu cloud VM image?

-1

This denotes that your package installer is being used by some another process.
Simplest way to get rid of this is to kill the init process i.e.

kill -9 -1

Warning
This will log you out killing all the processes, So Save for your current work
Not a efficient method but works..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.