Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem with Ubuntu software center. It is "Searching" and "applying changes" for long period of time. I tired to cancel by clicking cross(X) mark. However, it is now stuck at "cancelling". It won't let me download any new application even from terminal i guess.

neal@neal-G50VT:~$ sudo apt-get install gnome-tweak-tool
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?
neal@neal-G50VT:~$ sudo dpkg --configure -a
dpkg: error: dpkg status database is locked by another process

There are similar question here, but with no answers:

Software Center stuck for Dropbox

Software Center freezes during “applying changes

share|improve this question
I would try doing killall software-center. That should terminate software center. You may need to killall dpkg if there's still the "installation" stuffs in the background. – Thomas Ward Jun 5 '12 at 13:43
Tired this too. But no luck. – nebula Jun 5 '12 at 14:24
try adding the -9 argument to them, so its killall -9 software-center and killall -9 dpkg – Thomas Ward Jun 5 '12 at 14:25

I had the same issue too. However, I tried the following. Ran

sudo lsof /var/lib/dpkg/lock

From there I identified the PID of the process causing my dpkg to lock. Then I did

sudo kill -TERM <PID>

Next, I did a

 sudo dpkg --configure -a

and waited for the result... after that i did a regular

sudo apt-get update && sudo apt-get upgrade

Hope it will work for you too.

share|improve this answer
Best answer thank YOU – ucefkh Oct 1 '13 at 1:16
@ucefkh , Please thank me by up-voting the answer so that everyone else could find the best solution for such problem.. – nipunshakya Oct 1 '13 at 10:32
i did , good job – ucefkh Oct 1 '13 at 14:14
when I run the sudo lsof /var/lib/dpkg/lock it says lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. I am having the same problem in Ubuntu 14.4 – Waqas May 16 '14 at 13:38
Worked for to resolve the same issue described by the original question in 15.04. Thanks! – bhotel Jun 8 '15 at 7:24

Try to search for and terminate the /usr/bin/dpkg process:

Gabriel@UMWC:~$ ps ax | grep dpkg
 2058 pts/0    SNs+   0:00 /usr/bin/dpkg --status-fd 14 --configure -a --force-confdef --force-confold
 2061 pts/0    SN+    0:00 /bin/sh /var/lib/dpkg/info/nautilus-dropbox.postinst configure 
 2275 pts/2    S+     0:00 grep --color=auto dpkg
Gabriel@UMWC:~$ sudo kill 2058
share|improve this answer

Make sure there isn't a dialog window somewhere that needs your input to allow the installation to proceed.

In a similar situation, you see, kill -9 worked for me. But then when I started Ubuntu Software Center again it was still stuck in the same spot. Until I closed all the open windows and saw that it was waiting for me to enter an answer. Duh. Software then finished installing.

share|improve this answer
dialog window buried under other windows was the issue for me. – smcg May 31 at 20:02

I was experiencing this same problem using 12.04 and trying to install dropbox. The approaches here were not working for me; I wasn't even able to remove and reinstall software center. The solution from this page solved my problem, and I don't see this solution here:

Specifically, the answer #9 provided by Patrick:

Run, as you did before:

sudo dpkg --configure -a

Press CONTROL+C to before the download of Dropbox [gets to 99%].

Remove dropbox:

sudo apt-get purge nautilus-dropbox

The instructions to install dropbox is provided by the dropbox website. Use this command to install (for 64-bit):

cd ~ && wget -O - "" | tar xzf -

and then run it using:

share|improve this answer

For a similar problem, I removed and reinstalled the software-center and killed dpkg, then ran sudo apt-get update. After that I upgraded the packages.

share|improve this answer
Do you mean something like sudo pkill dpkg ? – belacqua Nov 20 '12 at 0:23

i found that searching for the dpkg and sudo kill the process made the software center unresponsive which worked out well because all i had to do is reinstall software center.

sudo apt-get remove software-center

sudo apt-get autoremove software-center

To re-install Software Center:

sudo apt-get update

sudo apt-get install software-center

seems to work for me (note that i had tryed reinstalling before killing the dpkg and it still was stuck on "applying changes" so make sure to not skip out on that. :) hope this helps someone

share|improve this answer
autoremove does not take an argument. That is, sudo apt-get autoremove software-center is equivalent to sudo apt-get autoremove, and neither has anything in particular to do with the software-center package, though if you want to remove packages installed automatically as dependencies only of software-center, then it's correct to run sudo apt-get autoremove after running sudo apt-get remove software-center. Otherwise reinstalling USC just takes a single command: sudo apt-get --reinstall install software-center. (You probably want to use the --purge flag too, though.) – Eliah Kagan Aug 19 '13 at 4:32

The best solution to these , is this:

sudo apt-get remove software-center
sudo apt-get autoremove software-center

To re-install Software Center:

sudo apt-get update
sudo apt-get install software-center
share|improve this answer
This answer is practically identical to the answer from jon. Please read all the answer before writing yours. Additionally, thanks and personal comments are not expected in this site (to thanks, upvote an answer or a comment). – Rmano Nov 12 '13 at 3:22
Note that anything after autoremove does nothing - autoremove removes any and all automatically installed packages that are no longer required. In general, re-installation is rarely necessary. You should certainly try reconfiguring the package (sudo dpkg-reconfigure software-center) before doing anything drastic. – chronitis Nov 12 '13 at 12:53

Before deleting locks or killing anything, close all windows and make sure there is not a EULA popped up behind the Software Centre. These EULAs are very common, especially with software outside of the main repositories.

if that fails follow the other suggestions to unlock and kill the install process and try

sudo apt-get install -f


dpkg --configure -a 
share|improve this answer

You could try a reboot.

It would solve your problem.

share|improve this answer
Software Center will just pick up where it left off, on most systems. – Klikini Apr 27 '13 at 3:21

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.