How To Remove Packages From Ubuntu, Debian, Mint and Kali with Apt-Get Uninstall Command with Examples
apt-get is standard package manager provided by popular distributions like Ubuntu, Debian, Mint and Kali. We can use
purge in order to remove packages from system.
apt-get This package manager provides a lot of options in order to manage packages precisely. We have all ready examined very complete tutorial about
apt-get command in the following link.
Uninstall Single Package
The simples usage form for
apt-get remove command is providing single package name. While providing package name we can provide only package name or other architecture and distributions related parts too. In this exmaple we will remove
$ sudo apt-get remove tmux
Automatically Remove Package
As we can see in previous example the
apt-get command is asking question about am I sure for this operation. Providing
Y will accept but every time doing this can bore us. We can provide
-y option if we want accept and do not provide further
Y to the console like below.
$ sudo apt-get remove -y tmux
Uninstall Multiple Packages
We can also uninstall multiple packages with a single command. We will delimite the package names with space. In this example we will remove packages named
$ sudo apt-get remove tmux vim
Uninstall Multiple Packages with Globe
Some packages are provided with same begging but different end for their names. For example
openoffice-calc etc. We can use globe
* operation to specify all packages those starts with
openoffice- name like
$ sudo apt-get remove openoffice-*
Uninstall Packages and Remove Configurations Too with purge
Uninstalling packages with
removewill only uninstall package but do not remove related configuration and cache files. We can use
purge in order to remove all related configuration and cache files like below.
$ sudo apt-get remove --purge tmux
Uninstall Unused Packages and Cache Files
After some time the old and cache files will take some space in our disk. These files are completely unnecessary files and can be removed without problem. The
autoremove command can be used to remove all these files and cache.
$ sudo apt-get autoremove