Apt upgrade failing for lock file [scream!]

$ sudo apt update && apt upgrade
Get:1 https://repo.pureos.net/pureos byzantium InRelease [5,851 B]
Get:2 https://repo.pureos.net/pureos byzantium-updates InRelease [4,580 B]
Get:3 https://repo.pureos.net/pureos byzantium-security InRelease [4,581 B]
Fetched 15.0 kB in 7s (2,299 B/s)                                                                                                  
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
$ ls -lh /var/lib/dpkg/
total 2.8M
drwxr-xr-x 2 root root 4.0K Mar 31 18:22 alternatives
-rw-r--r-- 1 root root 128K Jan 16 04:22 available
-rw-r--r-- 1 root root    8 Jan 16 04:21 cmethopt
-rw-r--r-- 1 root root  237 Jan 16 04:35 diversions
-rw-r--r-- 1 root root  186 Jan 16 04:33 diversions-old
drwxr-xr-x 2 root root 264K Mar 31 18:22 info
-rw-r----- 1 root root    0 Mar 31 18:22 lock
-rw-r----- 1 root root    0 Jan 16 04:25 lock-frontend.save
drwxr-xr-x 2 root root 4.0K Jul 14  2021 parts
-rw-r--r-- 1 root root  137 Jan 16 04:54 statoverride
-rw-r--r-- 1 root root  100 Jan 16 04:27 statoverride-old
-rw-r--r-- 1 root root 1.2M Mar 31 18:23 status
-rw-r--r-- 1 root root 1.2M Mar 31 18:22 status-old
drwxr-xr-x 2 root root 4.0K Mar 31 18:10 triggers
drwxr-xr-x 2 root root 4.0K Mar 31 18:23 updates
$

Can anyone tell me why apt is getting hung up on /var/lib/dpkg/lock-frontend - obviously, I’ve moved /var/lib/dpkg/lock-frontend in an attempt to hide it, but that’s been no use… I’ve checked top for gnome-software running or something, but nothing obvious shows up

You forgot sudo before the upgrade command :stuck_out_tongue:

1 Like

AAAAARRRRR! :rofl: