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

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


This post was last updated on August 1st, 2020 at 12:21 pm

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.

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.

Previous How To Setup NFS In Ubuntu 20.04 LTS?
Next How To Remove/Uninstall Software packages from CentOS, RHEL, Fedora?

About author

You might also like

Linux Topics 0 Comments

How to Find Exact Name of A Package by Using apt-cache in Linux?

This post was last updated on August 1st, 2020 at 10:53 pmIn a debian based package management system the apt-cache is a low-level tool to manipulate and obtain information about

How To 0 Comments

Linux I/O Redirection

This post was last updated on May 26th, 2020 at 03:07 pmCool commands The following command saves stdout and stderr to the files “out” and “err”, respectively. [[email protected] /root]# ./cmd

Linux Topics 0 Comments

How To Install And Use GNU Emacs On Linux?

The Emacs or GNU emacs is one of the oldest and feature-rich text editor. Initially, it was developed for the Unix-like operating systems but later released for Windows and such


No Comments Yet!

You can be first to comment this post!

Leave a Reply