How To Remove / Uninstall Software Packages From Debian, Ubuntu, Linux Mint?

Different Linux distribution comes with different tools to manage software packages on it. Debian and its derivative use the apt package manager to install and remove packages from a system.

You can use aptitude or synaptic to manage software packages from GUI. Linux distributions such as Ubuntu provide software center from where you can install or remove a software package graphically.

In this article, we will discuss removing an installed package from the command line in Debian, Ubuntu, Linux Mint, etc.

The Package Management System

Even though the Ubuntu and Linux mint are debian based, they all use some different kinds of package management systems. Let’s look in brief about all these in this section.

Advanced Packaging Tool (apt)

The apt provides a command-line interface to interact with core libraries of OS for the installation, up-gradation, and removal of a package. It can be considered as the front end to dpkg which is used in Debian, Ubuntu, and its derived Linux distributions.

dpkg (Debian package)

The dpkg is also used to install, remove, and perform such other operations on the .deb file. It is a low-level tool it works with downloaded files unlike apt which can fetch the packages from a remote location and can resolve dependencies.

How to Remove / Uninstall software packages from Debian, Ubuntu, and Linux Mint?

To remove a package in a debian based system you could use the following command –

sudo apt-get remove package_name

For example –

sudo apt-get remove vlc

You can remove a package using dpkg also by using –

sudo dpkg -r package_name

For example –

sudo dpkg -r vlc

Remove software packages by using the apt-get purge command

The apt-get purge command will remove the software and clean modified user configuration files that were left after the removal of software. This command will also remove the dependencies of a package.

Now use the following command to remove a software package –

sudo apt-get purge package_name

For example –

sudo apt-get purge vlc

The above command will remove vlc as well as its dependencies.

How to remove dependencies that are no longer needed?

The apt autoremove command removes packages that were automatically installed because some other package required them, but when the package was removed, they are no longer needed.

Execute the following command to remove the packages that are no longer needed –

sudo apt-get autoremove

The packages that will be removed here can also be known as unused dependencies.

Conclusion

Now by reading this article you are able to remove a software package from a Debian based distribution. If you have any thoughts on the topic you can share it with us in the comments below.

Leave a Comment