Ubuntu 16.04 with Cinnamon desktop.
I cannot update. Attempting gives
$ sudo apt-get update
Reading package lists... Done
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
I can check to see what file has this locked:
$ sudo lsof /var/lib/apt/lists/lock
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
aptd 11127 root 9u REG 0,24 0 181089 /var/lib/apt/lists/lock
aptd 11127 root 57u REG 0,24 0 181089 /var/lib/apt/lists/lock
aptd 11127 root 58u REG 0,24 0 181089 /var/lib/apt/lists/lock
$ ps aux | egrep "11127|PID" | egrep -v grep
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 11127 0.5 1.4 296068 103516 ? SNl 08:59 0:06 /usr/bin/python3 /usr/sbin/aptd
I don't know what /usr/sbin/aptd
is or if it's safe to kill. man /usr/sbin/aptd
exists, but it didn't tell me much. I can't find anything about this in particular online, either.
Is /usr/sbin/aptd
related to the small orange square with the white star in my system tray that keeps trying to remind me to update? Is it safe to kill?
Edit: After waiting a while, whatever had the lock released it on its own. No need to kill anything.
/usr/sbin/aptd
or whether it's safe to kill it. My own question is moot now, though. – Darien Marks Jan 08 '18 at 00:53lsof
and even smarter to wait.aptd
is used by the package manager to install upgrades in the background. NEVER terminateaptd
unless you know how to do so safely. And ABSOLUTELY NEVER release the apt lock manually while any package manager is running. The consequence of violating either varies depending upon what was being installed when apt was interrupted. – user535733 Jan 08 '18 at 01:07