This is another article in our Ubuntu beginner series. If youāre completely new to Ubuntu, you might wonder how to install applications.
The easiest way is to use the Ubuntu Software Center. Search for an application by name and install it from there.
Life would be too simple if you could find all the applications in the Software Center. Thatās not the case, unfortunately.
Some applications are available via ādebā packages. These are archived files that end with the .deb extension.
You can think of .deb files as .exe files in Windows. You double-click on the .exe file and it starts the installation procedure in Windows. Deb packages are pretty much the same.
You can find these deb packages in the download section of a software providerās website. For example, if you want to install Google Chrome on Ubuntu, you can download the Chrome deb package from its website.
Now the question arises, how do you install deb files? There are multiple ways of installing deb packages on Ubuntu. Iāll show them to you one by one in this tutorial.
Installing .deb files on Ubuntu and Debian-based Linux Distributions
You can choose a GUI or command-line tool for installing a deb package. The choice is yours.
Letās go on and see how to install deb files.
Method 1: Use the default Software Center
The simplest method is to use the default software center in Ubuntu. Thereās nothing special to do here. Simply go to the folder where you downloaded the .deb file (usually the Downloads folder) and double-click on the file.
It will open the software center, where you should see the option to install the software. All you have to do is to hit the install button and enter your login password.

See, itās even simpler than installing from a .exe file on Windows, isnāt it?
Troubleshoot: Double-clicking deb file doesnāt open in the software center in Ubuntu 20.04
Double-clicking the deb file in Ubuntu 20.04 opens the file in archive manager instead of software center.
This is weird but can easily be fixed. All you have to do is right-click on the deb file and go for the Open With option. Here, choose open with Software Install as the default choice.

Method 2: Use Gdebi application for installing deb packages with dependencies
Again, life would be a lot simpler if things always went smoothly. But thatās not life as we know it.
Now that you know .deb files can be easily installed via the Software Center, let me tell you about the dependency error that you may encounter with some packages.
What happens is that a program may be dependent on another piece of software (such as libraries). When the developer is preparing the deb package for you, he/she may assume that your system already has that piece of software.
But if thatās not the case and your system doesnāt have those required pieces of software, youāll encounter the infamous ādependency errorā.
The Software Center cannot handle such errors on its own so you have to use another tool called gdebi.
gdebi is a lightweight GUI application solely to install deb packages.
It identifies the dependencies and tries to install these along with the .deb files.

Personally, I prefer gdebi over the software center for installing deb files. It is a lightweight application so the installation seems quicker. You can read in detail about using gDebi and making it the default for installing DEB packages.
You can install gdebi deb package installer from the software center or using the command below:
sudo apt install gdebi
Method 3: Install .deb files in the command line
If you want to install deb packages in the command line, you can use either the apt command or the dpkg command. The apt command uses the dpkg command underneath it, but apt is more popular and easier to use.
If you want to use the apt command for deb files, use it like this:
sudo apt install path_to_deb_file
If you are in the same directory where the deb file is located, use it like this:
sudo apt install ./deb_file
If you want to use the dpkg command for installing deb packages, hereās how to do it:
sudo dpkg -i path_to_deb_file
In both commands, you should replace path_to_deb_file with the path and name of the deb file youāve downloaded.

If you get a dependency error while installing the deb packages, you can use the following command to fix it:
sudo apt install -f
How to remove deb packages
Removing a deb package isnāt a big deal, either. And no, you donāt need the original deb file you used to install the program.
Method 1: Remove deb packages using apt command
All you need is the name of the program youāve installed and then you can use apt or dpkg to remove that program.
sudo apt remove program_name
Now, how do you find the exact program name you need to use in the remove command? The apt command has a solution for that as well.
You can find the list of all installed files with the apt command, but manually going through this will be a pain. So you can use the grep command to search for your package.
For example, I installed the RocketChat application in the previous section but if I want to find out the exact program name, I can use something like this:
sudo apt list --installed | grep chat
This will give me all the packages that have āchatā in their name, and I can get the exact program name from there.

As you can see, a program called ārocketchatā is installed. Now you can use this program name with the apt remove command.
Method 2: Remove deb packages using dpkg command
You can use dpkg to find the installed programās name:
dpkg -l | grep chat
The output will give all the packages installed that have āchatā in their names.

ii in the above command output means that the package has been correctly installed.
Now that you have the program name, you can use the dpkg command to remove it:
dpkg -r program_name

What about updating the deb packages?
Some deb packages (like Chrome) provide updates through system updates, but for most other software youāll have to remove the existing program and install the newer version.
I hope this beginnerās guide helped you install deb packages on Ubuntu. I added the removal part so that you can have better control over your installed programs.