How to fix lock /var/lib/dpkg/lock – open (11 Resource temporarily unavailable) Error

Sponsored Link
If you are getting the following error when you try to install any packages use the following tip to fix this


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?


First thing you need to check Synaptic Package Manager open at the same time


That happens when synaptic or another package update / installation application is already running. Close any other package managers (including Add/Remove application, language pack installer, etc.) and retry.

Sponsored Link

You may also like...

55 Responses

  1. Kein says:

    I found out the problem.
    When you run sudo apt-get update
    you may find some lines saying “Failed to fetch http://…”
    This is the reason of lock.
    Check your software sources and uncheck unfetched links from active, reload it and Woula

  2. Robert says:

    Hi I have a very big prob, my iphone was and still is stuck in safe mode because of fake fermware i could not remove, so i went to var,lib apt,list and deleted all except partial, that didnt work so i went to var,lib,dpkg, and deleted the updates and mistakely the files down below update, now my computer will not recognise my iphone plus there is nothing in cydia under manage except the headlines no packages it says no such files as var,lib dpkg, please help.

  3. Onkar Raut says:

    ps -e | grep apt (might show you a number which is essentially a job number. My system was locked due to apt-get and showed me apt-get as job number 1594)

    sudo kill 1594 (modify number to your current run)

    This works perfect without having to delete the lock and causing unnecessary changes to your system

  4. jay says:

    kein i dont get it o.o… like what do i uncheck im like new to ubuntu

  5. kuldeep singh says:

    how can i unlock the var/libs/dpkg/lock file…..plz some buddy short me out

  6. steve says:

    All processes in linux create lock files that tell another process that it is running or in use. This is so that two programs do no write to a file at the same time and cause each other problems.

    One way to force close the process if you can not do it properly is

    lsof | grep /var/lib/dpkg/lock

    returns something like.
    xx number xx xx xx xx xx xx xx /var/lib/dpkg/lock

    type kill -9 number (this will kill the process id from above)


    lsof justs lists all open files on your system, and you can use a command like grep to search for the file that is suspect which can be killed if necessary

  7. nara says:


  8. Eruaran says:

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

  9. mohsen says:

    thanks a looot

    it works great …
    I kill any process which contains apt !!!
    but it works fine 🙂

  10. Kok says:

    Thanks Eruaran. That worked for me.

  11. jack frost says:

    Nothing working for me. I am newb and might be screwing it up. Copied and pasted several of the above options to Konsole and tried them ….nothing removing “lock”. Permissions?

    no problem I am root, what do I do?

  12. mehul says:

    Hey , Nothing working for me. I am newb and might be screwing it up. Copied and pasted several of the above options to Konsole and tried them…but none of this worked also when i tried from synaptic package manager didnt work !!!,please guide what to do ?

  13. missnaem says:

    thanks Eruaran
    it works for me 😉

  14. Rakhunathan says:

    Hey friends,
    just type
    sudo bash (or) sudo -s
    This makes you the root user and obtain administrator previlages. type “whoami” and check that you will be the root user…now all apt commands work..

  15. Saurabh says:

    Thanks Rakhunathan

  16. Norah says:

    ps -e | grep apt identified the process number

    Followed by:
    sudo kill #### did not kill the process

    lsof | grep /var/lib/dpkg/lock did not return any results

    However, log off/on did. 🙂

  17. suren says:

    from the terminal identify the process number with ps -e | grep apt
    then kill the process with
    kill -9 ####

  18. Arya says:

    thnx rakhunathan 🙂

  19. srikanth says:

    rakhunathan man u helped me save my day.

  20. fr33mat3 says:

    It worked great thanks mate 🙂

  21. Sanket says:

    thanks Eruaran it worked for me

  22. sreetama says:

    I get the following when I run the command, not sure what to do further.

    sreetama@sreetama-laptop:~$ ps -e | grep apt
    4093 ? 00:00:00 aptd
    sreetama@sreetama-laptop:~$ kill -9 4093
    bash: kill: (4093) – Operation not permitted

  23. admin says:

    try to run this commnd as root using the following command

    sudo kill -9 4093

    enter your password

  24. lmlng says:

    try this running this line in your terminal:::sudo killall dpkg && killall frontend
    then run:::sudo apt-get update

  25. linger says:

    worked for me !! thanks

Leave a Reply

Your email address will not be published. Required fields are marked *