1

This is the terminal message I keep getting when trying to update via: sudo apt-get update

$ sudo apt-get update
[sudo] password for petros:
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/

How can I solve it?

marked as duplicate by karel, George Udosen, edwinksl, Zanna, Ravexina May 4 '17 at 8:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

it seems that there is some process using the lock and thats why you cant get update. to view this pending process type command

ps aux | grep apt

this will show all processes containing the word apt

now the process which is pending is one of them.

now you need to judge which is pending and kill that process by typing command

sudo kill process-number

or

sudo kill -9 process-number

this will end the process and you are ready to update

if this does not work then your sudo do not sufficient permissions. thus you need to do this process as a root. to become a root you need to set password for root and to this type command

sudo passwd

then enter your sudo password and then enter password for UNIX (root) password which will set to your root user.now type command su and then enter the unix(root) password which we set earlier and then try to update

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