my problem is as following: unable to add/remove any program using either update-manager or Synaptic Package Manager or terminal

  1. update-manager is asking for partial upgrade and while updating software-center 5.2.6 catalog , there is no progress beyond the line "this is may take a moment"
  2. synaptic is unable to obtain an exclusive lock, similarly can't do terminal command
    sudo apt-get update
  3. if i try to break down the lock using the command

    sudo fuser -cuk /var/lib/dpkg/lock; sudo rm -f /var/lib/dpkg/lock

    it turns off my monitor display and i have to restart the whole system.

    note: this whole trouble started ,when i found ubuntu software-center missing after adding a repository and reinstalled it.



The parameters of fuser are wrong. The -c option is an alias for -m option that select the whole filesystem of the path and the -k parameter kill all processes the own that filesystem (see fuser man page for reference). So, with this command you kill all system except the kernel.

Use this command for get the pid (and user) of the process the use the dpkg database:

$ sudo fuser -u /var/lib/dpkg/lock

Example output:

/var/lib/dpkg/lock:  14502(root)

You can kill it (if you know what you're doing) with:

$ sudo kill -9 14502

For remove the lock only use:

$ sudo rm /var/lib/dpkg/lock
  • i used command '$ sudo kill -9 1737' and got this after running update E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.'$ sudo dpkg --configure -a' Setting up software-center (5.2.6) ... Updating software catalog...this may take a moment. INFO:softwarecenter.db.pkginfo_impl.aptcache:aptcache.open() – Manish Kumar Chauhan Nov 16 '12 at 16:23
  • Ok, you have interrupted dpkg during software-center upgrading. With sudo dpkg --configure -a you have finished upgrading. All done. – Daniele Napolitano Nov 26 '12 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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