Fixing “E: Could not get lock /var/lib/apt/lists/lock – open (11: Resource temporarily unavailable)” error

Friday, 15th October 2010

You’ve probably encountered the error:

“E: Could not get lock /var/lib/apt/lists/lock – open (11: Resource temporarily unavailable)” After executing:

debian:~# apt-get update
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the list directory

There are plenty of reasons which might have led you into this shitty situation, anyways the solution is:

debian:~# killall -9 apt-get aptitude
debian:~# rm -f /var/lib/apt/lists/lock

killall -9 apt-get aptitude might not be really necessary, if there are no hanged apt-get or aptitude processes, however I show it heresince sometimes, it might be the problem cause.

If you further or beforehand get the error:
,br /> E: Could not get lock /var/lib/dpkg/lock – open (11 Resource temporarily unavailable)E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

Then you will have to also delete the /var/lib/dpkg/lock.

debian:~# rm -f /var/lib/dpkg/lock

Hopefully this should be enough for you to solve your apt-get update issues.

Share this on:

Download PDFDownload PDF

Tags:

20 Responses to “Fixing “E: Could not get lock /var/lib/apt/lists/lock – open (11: Resource temporarily unavailable)” error”

  1. Baptiste says:
    Firefox 3.6.12 Firefox 3.6.12 Ubuntu 10.10 Ubuntu 10.10
    Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.12) Gecko/20101027 Ubuntu/10.10 (maverick) Firefox/3.6.12

    Thanks 🙂
    worked like a charm

    View CommentView Comment
  2. Drill says:
    Firefox 3.6.3 Firefox 3.6.3 Ubuntu 10.04 Ubuntu 10.04
    Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

    Thanks so much. Magical solution

    View CommentView Comment
  3. cengiz says:
    Opera 11.01 Opera 11.01 Windows XP Windows XP
    Opera/9.80 (Windows NT 5.1; U; tr) Presto/2.7.62 Version/11.01

    This is really… magical solution… THX

    View CommentView Comment
  4. mrdwab says:
    rekonq rekonq GNU/Linux GNU/Linux
    Mozilla/5.0 (X11; U; Linux i686; en-IN) AppleWebKit/533.3 (KHTML, like Gecko) rekonq Safari/533.3

    This was the only solution I found that worked. (I had to be sudo though.)

    Thanks!

    View CommentView Comment
  5. Tirpox says:
    Firefox 3.6.22 Firefox 3.6.22 Ubuntu 10.10 Ubuntu 10.10
    Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.22) Gecko/20110905 Ubuntu/10.10 (maverick) Firefox/3.6.22

    Thanks very much, I have Ubuntu 10.10 and worked me (the first command didn’t worked me) but when I put the remove, like a magic 🙂
    Thanks again

    View CommentView Comment
  6. AlexKaper says:
    Firefox 6.0 Firefox 6.0 Windows 7 x64 Edition Windows 7 x64 Edition
    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20100101 Firefox/6.0

    tanks.
    it’s work carefully.

    View CommentView Comment
  7. CeeJay says:
    Firefox 6.0.2 Firefox 6.0.2 Windows 7 Windows 7
    Mozilla/5.0 (Windows NT 6.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2

    Hey, Thanx for the solution. Worked brilliantly

    View CommentView Comment
  8. Ur fan says:
    Firefox 6.0.2 Firefox 6.0.2 GNU/Linux GNU/Linux
    Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20100101 Firefox/6.0.2

    lol….max…..we are badly need of this…..thank u soooooooooo much……….

    View CommentView Comment
  9. udana says:
    Firefox 3.6.17 Firefox 3.6.17 Ubuntu 9.10 Ubuntu 9.10
    Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110422 Ubuntu/9.10 (karmic) Firefox/3.6.17

    maxxxxa… THANKS

    View CommentView Comment
  10. tanzzel says:
    Firefox 3.6.10 Firefox 3.6.10 Ubuntu 10.10 Ubuntu 10.10
    Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10

    thanks

    View CommentView Comment
  11. raghavendra says:
    Firefox 8.0 Firefox 8.0 Ubuntu Ubuntu
    Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:8.0) Gecko/20100101 Firefox/8.0

    thanks ….it works fine

    View CommentView Comment
  12. avidms says:
    Firefox 7.0.1 Firefox 7.0.1 GNU/Linux GNU/Linux
    Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

    thanks.. it works

    View CommentView Comment
  13. Mehdavi says:
    rekonq rekonq GNU/Linux GNU/Linux
    Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.3 (KHTML, like Gecko) rekonq Safari/533.3

    I have tried the above commonds and I am getting the following messagerm: cannot remove `/var/lib/dpkg/lock’: Permission denied
    why plzzzzzzzzzzzzzz

    View CommentView Comment
    • admin says:
      Opera 11.00 Opera 11.00 GNU/Linux x64 GNU/Linux x64
      Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.7.62 Version/11.00

      Hi Mehdavi,

      What Linux distribution are you running? Did you tried everything described in the article, are you 100% sure
      /var/lib/dpkg/lock is not existing.

      best
      Georgi

      View CommentView Comment
  14. Arnold says:
    Firefox 3.6.10 Firefox 3.6.10 Ubuntu 10.10 Ubuntu 10.10
    Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10

    Thank you Kiss

    View CommentView Comment
  15. cnreema says:
    Firefox 7.0.1 Firefox 7.0.1 GNU/Linux GNU/Linux
    Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

    Yeah! *-* This is the only solution that worked! 🙂

    View CommentView Comment
  16. Arik says:
    Firefox 11.0 Firefox 11.0 Ubuntu Ubuntu
    Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:11.0) Gecko/20100101 Firefox/11.0

    This is helping me on 12.04…
    Thanks for sharing….

    View CommentView Comment
  17. ilPider says:
    Chromium 18.0.1025.151 Chromium 18.0.1025.151 Ubuntu 12.04 x64 Ubuntu 12.04 x64
    Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.151 Chrome/18.0.1025.151 Safari/535.19

    many thanks
    useful also on 12.04

    View CommentView Comment

Leave a Reply

CommentLuv badge