Installing applications from a deb file is quite simple. You double click on it and it opens in the Software Center application and you install it from there.
But what about uninstalling a .deb package in Ubuntu or Debian? How do you remove the package you installed some time back.
While there are several ifs and buts around it, the simplest and most reliable way of deleting a deb file is by using the apt remove command.
sudo apt remove program_name
As you can see, you need to know the exact package name here. This may not always be straightforward. For example, if you install Google Chrome on Ubuntu, the program is known as ‘google-chrome-stable’ in the command line. Did you already know that? I guess not.
In this tutorial, I’ll go into detail about finding the exact package name and then using it to remove the application. I’ll also discuss using a graphical method for deleting .deb packages.
Removing package installed via deb files from Ubuntu
Before I show you how to remove deb packages from the command line, let’s just quickly look at it in the Software Center application.
Method 1: Check if the application can be removed from the software center
Ubuntu has the Software Center GUI application that allows to search for applications, install them and remove them.
The Software Center may not show the application installed when you search for it.
If you find it, you can remove the application by clicking the trash icon or remove button.