This tutorial, I will show you several ways how to install deb packages on Ubuntu and other Debian-based Linux Distributions. We will see how to install .deb file using dpkg command, using apt, using gdebi, using eddy, and finally using the Software Center.
The easiest way to install an application in Ubuntu Linux is to use the Ubuntu Software Center. You just have to search for an application by name and install it from there.
Some applications are only available via ‘deb’ packages. These are archived files that end with the .deb extension.
1) Installing .deb File Using dpkg Command
.deb file using dpkg command we will use
Let's see the example of that:
$ sudo dpkg -i ./google-chrome-stable_current_amd64.deb
If we get any problems with missing dependencies, we must run the following apt command to fix it:
$ sudo apt install -f
To remove the package with dpkg command, we will use
-r parameter like in the following example:
$ sudo dpkg -r google-chrome-stable
2) Installing .deb File Using APT Command
To install .deb package using apt, we should use apt install option.
Here is the terminal example:
$ sudo apt install ./google-chrome-stable_current_amd64.deb .. Do you want to continue? [Y/n]
Y the installation will proceed. This way all of the application dependencies required will install too.
We can remove the google chrome using apt with the remove option:
$ sudo apt remove google-chrome-stable .. Do you want to continue? [Y/n]
This way only google-chrome-stable package will be removed. We can also run apt autoremove to remove all of the dependencies that are not needed anymore.
3) Installing .deb File Using gdebi
To install .deb packages with gdebi, we first have to install gdebi on our Linux system using:
$ sudo apt install gdebi
After that, we need to browse for our .deb file from gdebi application and open it:
After that, we are presented with the package info and an Install Package button:
By clicking on the Install Package button we need to authenticate ourselves for the installation to proceed:
When the installation is finished, we will see this window:
Here we have the option to reinstall or remove the package.
4) Installing .deb File Using eddy
To use eddy application to install .deb packages, we first need to compile it from the source. You can find the source code on their GitHub repository and you can read the instructions on how to compile it in the linked article above.
First, we need to browse for the .deb package file from eddy:
By clicking on the package filename, you can see the package details:
Now, when we click on the install button we first have to authenticate, so we can install the selected package:
After that, the package installation will proceed.
Note: Eddy is not available in repo, you have to install from sourcee
5) Installing .deb File Using Software Center
Installing .deb package using the Ubuntu Software Center is the simplest way to install it. First, we will browse for the package file in the Nautilus file manager.
Then we will double click on the package and click install.
That's it. There is no simpler way to install .deb packages.
We have come to the end of this tutorial. We have seen most, if not all of the ways you can install any .deb package that is not available from the standard repositories. In most cases, the application you need can already be found in the official repositories, but in case it's not available, you can download the application package from the developer's website and install the package using one of the methods shown in this tutorial.