Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I just wondered if somebody could tell me what this means:

E: dpkg ble avbrutt. Du må kjøre «sudo dpkg --configure -a» manuelt for å rette problemet,
reidsr@ubuntu:~$ sudo dpkg --configure -a
dpkg: error: dpkg status database is locked by another process

How do I run sudo dpkg --configure -a manually?

share|improve this question
Is this machine important, that is to say, can you reboot it? Should resolve this real quick –  Huckle Nov 20 '12 at 0:19
possible duplicate of How do I fix dpkg errors after a failed upgrade? –  AgentCool Mar 15 '13 at 13:19

3 Answers 3

You can not run several packages applications/commands/tools at the same time. Sometimes, it means that synaptic, apt-get or the package update tool are running in the backgroung. Just close other package tools, or wait for them to be finished. And dpkg will run.

share|improve this answer

One could also try:

sudo apt-get install -f

To fix any broken packages:

Fix; attempt to correct a system with broken dependencies in place. This option, when used with install/remove, can omit any packages to permit APT to deduce a likely solution. If packages are specified, these have to completely correct the problem. The option is sometimes necessary when running APT for the first time; APT itself does not allow broken package dependencies to exist on a system. It is possible that a system's dependency structure can be so corrupt as to require manual intervention (which usually means using dselect(1) or dpkg --remove to eliminate some of the offending packages). Use of this option together with -m may produce an error in some situations. Configuration Item: APT::Get::Fix-Broken.

share|improve this answer

First run:

sudo rm /var/lib/dpkg/lock


sudo dpkg --configure -a

You should be fine afterwards :)

share|improve this answer
One should never remove lockfiles manually. They're there for a reason. Please, only use this as a very last resort. First try to identify and close other applications using the package management. –  gertvdijk May 6 '13 at 16:06
If there is a process actually using the lock file, it would probably be better to kill that process instead of just removing the lock file. You should be able to find the process with lsof /var/lib/dpkg/lock. –  Abe Voelker May 27 at 15:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.