How To Unlock The APT Package Manager On Ubuntu, Linux Mint, Debian, Pinguy OS, Elementary OS, Debian And Their Derivative Systems

Hello Linux Geeksters. In this article I will show you how to unlock your APT package manager on Ubuntu, Linux Mint, Elementary OS, Pinguy OS, Debian and their derivative systems.

When an apt-get install process gets jammed or receives SIGINT via Ctrl + C, dpkg gets locked and you cannot install any other packages until you reboot (or dpkg gets unlocked by itself).

To easily unlock apt/dpkg via the command-line, you have to remove the /var/lib/dpkg/lock package and force dpkg to re-read the lock file:

$ sudo rm -rf /var/lib/dpkg/lock
$ sudo dpkg --configure -a

Tagged with: , , , , , , , , , , ,
Posted in The Linux and Unix Articles!

Leave a Reply

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




Subscribe to get the latest Linux news and how to guides directly on your e-mail!