I'm not able to install, update or do anything else with apt-get, aptitude, dpkg and so on.

The lock-file /var/lib/dpkg/lock exists from boot-time on. When I delete it and run apt-get update, it prints out, that dpkg has been interrupted. I tried dpkg --configure -a as mentioned in the help text, but that runs into a problem with gconf2:

root@andre-ubuntu:/home/andre# dpkg --configure -a
Setting up libbonoboui2-0:amd64 (2.24.5-0ubuntu2) ...
Setting up libgnomeui-0:amd64 (2.24.5-2ubuntu3) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Setting up gconf2 (3.2.6-0ubuntu1) ...

 GConf-WARNING **: Client failed to connect to the D-BUS daemon:
 Did not receive a reply. Possible causes include: the remote application 
 did not send a reply, the message bus security policy blocked the reply, 
 the reply timeout expired, or the network connection was broken.

dpkg stops at this point and i can't even interrupt it with Ctrl+C.

I have the following version of Ubuntu:

Linux andre-ubuntu 3.8.0-19-generic #30-Ubuntu 
SMP Wed May 1 16:35:23 UTC 2013 
x86_64 x86_64 x86_64 GNU/Linux

Do you have any ideas what to do?

2 Answers 2


I was having the same problem some years ago due to a GUI widget that was looking for system updates and which was locking the package manager.

You can maybe verify running GUI applications (including widget, systray) to be sure that no one related to package management is opened.


If you have a package in most Linux versions that didn’t install all the way you will get a locked error. I don’t remember how the error is stated. It says synaptic is locked or something like that. Try running this it usually works. Works for Ubuntu package manager to, I have used it on debian and ubuntu and it worked both times. Open a terminal then type or copy and paste these:

sudo rm /var/lib/dpkg/lock
sudo rm -r /tmp/*
sudo dpkg –clear-avail && sudo apt-get update

Remember you won’t see your superuser password when you type it.

I have used this on Debian and Ubuntu and it has worked for me. This works with any linux package manager. I have used it on all of them when they were locked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .