Fix E: Could not get lock /var/cache/apt/archives/lock [Quick Tip]

Care to Share?


The other day a reader asked me that she had troubles with this kind of error:

E: Could not get lock /var/cache/apt/archives/lock – open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/

She was trying to follow one of the tips mentioned in things to do to after installing Ubuntu 14.04 when she encountered this error. Its one of the common occurring update errors in Ubuntu and also one of the least annoying ones.


If you are wondering what caused this error in the first place, the reason is quite evident in the error itself. The error says: Could not get lock /var/cache/apt/archives/lock – open (11: Resource temporarily unavailable). And this is what precisely happening. While you are trying to install some package with APT, some other package manager is running or an update is going on.


The first and foremost thing is to do nothing. I mean it. Once the other program that is using the resource completes the process, the resources will be available again.

If you are not able to figure which other program is causing this issue and want to get the control back immediately, try the following command to fix the issue of E: Could not get lock /var/cache/apt/archives/lock – open (11: Resource temporarily unavailable):

sudo rm /var/lib/apt/lists/lock

If the above command doesn’t work, try the one below:

sudo killall apt-get

This should kill (read close) all the other APT process running. I hope this quick tip helps in solving this common update error in Ubuntu. Any questions or suggestions are welcomed. Ciao :)

  • Sudeepto Dutta

    Thanks man. This problem is quite frequent with me too. But after knowing the reason and solutions to counter it, now I can deal with it :)

  • Tommy

    It doesnt work for me.

    Still have on install that I cant kill.


    • Tommy

      Was the picture lost?
      Here it is again.

      • Abhishek Prakash

        Hmm….. did you try both commands?

        • Tommy

          Yes and a more experienced friend helped me.
          We managed to delete it booting from a CD, but it popped up again when starting from the harddisk.
          Since I did not have a lot of stuff on the laptop I finally re-installed.