How to fix ‘E: Could not get lock /var/lib/dpkg/lock

In that case, dpkg won't remove them by itself, but the package's postrm script (which is called by dpkg), has to take care of their removal during purge. Removing of a package consists of the following steps: 1. Run prerm script. 2. Remove the installed files. 3. Run postrm script--update-avail, --merge-avail Packages-file NOTE: This program does not install, remove, purge any package. It ONLY sets the status of the package. any actual removal or purging is done the next time dselect, apt-get, aptitude, etc are run. SEE ALSO dpkg(1), dpkg-hold(1), dpkg-unhold(1), dpkg-purge(1) AUTHOR dpkg-remove was written Craig Sanders . dpkg-remove is Free Jan 01, 2010 · dpkg-query -Wf '${Installed-Size}\t${Package} ' | sort -n but this also takes the size of databases and extra files. Remove config files. If you uninstall stuff with apt-get remove sometimes debian does not removes config files and they also take up space. Now you can just use apt-get purge but I tend to forget that every time. If you'd like to remove the package itself (without the configuration files), you'll have to run: dpkg -r urserver. If you'd like to delete (purge) the package completely (with configuration files), you'll have to run: dpkg -P urserver. You may check if the package has been removed successfully - simply run again: dpkg -l | grep urserver Nov 06, 2018 · The apt-get remove command removes a software from your system but keeps the configuration files and any plugins and settings that you might have installed later. This helps in keeping the same settings when you want to reinstall the software. Run the following command as sudo in order to remove a software; $ sudo apt-get remove “package-name” Oct 19, 2016 · First, we will see how to find and remove unused packages in Ubuntu and its derivatives such as Linux Mint, elementary OS. Find and remove unused packages in Ubuntu using Deborphan. Deborphan is a command-line utility that can be used to find and remove unused or orphaned packages in DEB based systems. It is available in the official repositories. Remove the -Wvla flag from the set of compiler warning flags, since gcc on old host systems such as CentOS 5.8 doesn't support it, and it causes a build error

I faced this problem with a broken package, rvm.I tried many things like sudo apt install -f and sudo dpkg --purge --force-all rvm but nothing worked. Finally I managed to find this blog post that explains how to remove broken packages on Debian/Ubuntu.

How to Uninstall Programs from your Ubuntu System Nov 06, 2018 Fix DPKG: Error: DPKG Frontend Lock is Locked By Another Aug 07, 2019

Sep 04, 2019

Jan 01, 2010 how do I get apt-get to completely uninstall a package? Feb 23, 2013