17

I've been getting the following after running a dpkg command:

dpkg: error: dpkg status database is locked by another process

After running (from here):

sudo fuser -vki /var/lib/dpkg/lock

I get:

                     USER PID ACCESS COMMAND
/var/lib/dpkg/lock:  root       2591 F.... unattended-upgr

How do I check the progress of this process?

What are the consequences, if any, of killing it?

Lee
  • 471
  • 3
  • 5
  • 15

1 Answers1

20

You can see the latest entry in the log file e.g. /var/log/unattended-upgrades/unattended-upgrades-dpkg.log, try

tail /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
JuanPi
  • 301
  • 2
  • 5
  • 1
    Also, on ubuntu 20, it may be useful to check update status of `sudo upgrade` command (e.g. when ssh connection freezes). In this case: `tail /var/log/dpkg.log` – Pavel Sapehin May 13 '21 at 08:38