Friday, November 23, 2018

16.04 - How do I unlock apt?

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.

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...