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.
In this article, we will discuss removing an installed package from the command line in Debian, Ubuntu, Linux Mint, etc.
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 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.
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.
You might also like
This post was last updated on July 1st, 2020 at 07:24 amSystem uptime is how long a system has been up and running. Linux operating system provides various commands such
Gentoo Linux is a Linux distribution which is distributed in source format. That means the source code can be compiled locally according to the user’s requirement. Since the operating system
Contents1 Standard streams1.1 Input redirection – 1.2 Output redirection – 1.3 Append the output to an existing file-2 Pipe And Filters2.1 grep command-2.2 sort command-2.3 awk command- Standard streams In