How to Uninstall Programs on Debian

Unused and unwanted programs should be removed from the system as they take up a large amount of disk space. This article is about removing the programs that are no longer required in a Debian system. We will explain the removal of the program via both the Graphical user interface and the command line Terminal method.

Keep in mind that in order to install/uninstall any application in your Debian OS, you will require administrative rights.

We have used Debian 10 for running the commands and procedures mentioned in this article.

Uninstall Debian Applications Through Debian Software Center

In the following method, we will learn to uninstall applications through the Debian software center. To open the Software center, click on the Activities tab in the top left corner of your Debian desktop. Then search for the Software center using the keyword. When the result appears, click on its icon to open.

When the software center opens, you will see the following view. Go to the Installed tab. It will list all the installed applications in your system. From the list, search for the application you want to uninstall and click the Remove button in front of it.

Software center

When you click the Remove button, the following message will appear for you to confirm the decision. If you are sure about deleting the selected application, click Remove.

Remove application

Then you will be asked to provide a password for authentication. Enter the password and click Authenticate.

Authenticate as admin

Now the selected software will be uninstalled from your system.

Uninstall Debian Applications Through the Command Line

In the following method, we will see how to uninstall any application via the command line. To open the command line Terminal in the Debian system, click on the Activities tab in the top left corner of your desktop. Then search for the Terminal application using the search bar. When the Terminal icon appears, click on it to open.

For uninstalling the applications through the command line, we will use apt-get remove and apt-get purge commands. To list the packages installed in your system, you can use the following command in Terminal:

$ dpkg --list

From the output list, you can copy the exact package name that you want to remove.

Use apt-get remove command

Apt-get remove command will uninstall the package but will keep the data and configuration files along with dependencies that were added at the time of installation.

In order to remove an application, run the following command as sudo in Terminal:

$ sudo apt-get remove “package-name”

When prompted for the password, enter sudo password.

In the following example, we are removing Dconf editor from our system using the apt-get remove command:

$ sudo apt-get remove dconf-editor

Remove app using apt

The system might provide you with a Y/n option to confirm the removal process. Hit y to confirm and the software will be removed from your system.

Use apt-get purge command on Debian

Unlike apt-get remove command which just removes the software from the system, the apt-get purge command also removes the data and configuration files related to that software.

In order to remove the software and its configuration file, use the following command syntax in Terminal:

$ sudo apt-get purge “package-name”

In the following example, we are removing the Playonlinux application from our system. For that, we have used the following command in Terminal:

$ sudo apt-get purge playonlinux

Purge application on Debian

The system might provide you with a Y/n option to confirm the removal process. Hit y to proceed and the software will be removed from your system.

App removed successfully

Bonus: Cleaning up with autoremove

Whenever we install an application, the system also installs some other packages and libraries that this application depends on. When we uninstall the package, these dependencies are not removed and stay on the system. In order to remove those dependencies too, run the following command in Terminal:

$ sudo apt-get autoremove

It will list all the unused dependencies that are taking a lot of space on your system and provide you with the Y/n option to confirm the removal process. Hit y on your keyboard to remove all unused dependencies on your system.

Using apt autoremove

It is important to remove the unused packages and their dependencies from your system to free up and clean the disk space. From the above-discussed ways, you can choose to use apt-get remove to remove the packages only or apt-get purge to remove packages along with their configuration files too. In the end, you can use apt-get autoremove to make sure no unused dependencies are left behind.