PDA

View Full Version : [ubuntu] [SOLVED] Could not open lock file /var/cache/apt/archives/lock



Madwida
October 21st, 2008, 01:24 AM
Hi

When running the following command in terminal:

"apt-get autoremove && apt-get clean && apt-get autoclean" in order to remove unused packages (such as an obsolete kernel) I get the following output:

E: Could not open lock file /var/cache/apt/archives/lock - open (13 Permission denied)

E: Unable to lock the download directory


I am running it as root

Thanks a lot!

tuxxy
October 21st, 2008, 01:25 AM
Try giving the command root privs


sudo apt-get autoremove && sudo apt-get clean && sudo apt-get autoclean

a0u
October 21st, 2008, 01:43 AM
Hi

When running the following command in terminal:

"apt-get autoremove && apt-get clean && apt-get autoclean" in order to remove unused packages (such as an obsolete kernel) I get the following output:

E: Could not open lock file /var/cache/apt/archives/lock - open (13 Permission denied)

E: Unable to lock the download directory


I am running it as root

Thanks a lot!

If sudoing doesn't work...
Only one package manager can be running at any moment; that "lock" error ensures that there are no conflicts between two programs for the same resource.
Make sure that you don't have the Update Manager, Synaptic, etc. running.

jken146
October 21st, 2008, 01:44 AM
Check that you have no other instances of apt running (apt-get, aptitude, synaptic, Add/Remove...)

arkara
October 21st, 2008, 02:08 AM
If you do this like that

command && other command
you will need more than one sudos, like that

sudo apt-get autoremove && sudo apt-get clean && sudo apt-get autoclean

Madwida
October 21st, 2008, 02:36 AM
I must have had synaptic open; I think that was exactly it. And I even know that, too--but completely spaced it! Thanks a lot

kim062
February 22nd, 2010, 10:08 AM
why i cant login to my other acount in gyache???lately i can login but now i cant i dont know what happn...can u help me how to login and other acount in gyache on yahoo:confused::confused::confused::confused:

abhijeetkulkarni
January 13th, 2012, 03:24 AM
Try giving the command root privs


sudo apt-get autoremove && sudo apt-get clean && sudo apt-get autoclean

This worked for me. Thanks.