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

Liked it? Take a second to support Geekster on Patreon!
Tagged with: , , , , , , , , , , ,
Posted in The Linux and Unix Articles!

Leave a Reply

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

*

Support LinuxG via Patreon
Support LinuxG.net on Patreon!
Subscribe

  

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