Various Linux software was distributed only as source code many years ago. We had to compile the software from the source code in order to use it. If the source code of the software depended on other libraries, then we also had to download the source code of this library and compile it before compiling the software that we wanted to install.

If this library depended on some other libraries, then we had to download the source libraries and compile them. We had to go through a whole series of dependency problems, which at that time were called the “hell of dependencies”.

There used to be no packaging systems like today. These days, packages are precompiled for different computer architectures and stored on a central server (the so-called package repository), and package management software is used to automatically download, resolve dependencies, and install it.

Debian-based Linux distributions such as Debian GNU / Linux, Ubuntu, Linux Mint, and others use the APT package manager. The APT package manager package format is the DEB archive. The DEB archive extension is .deb.

Currently, most common software packages are available in the official package repository of the Linux distribution we use. Therefore, we can easily install it using the package manager, in the case of Ubuntu / Debian, the APT package manager. But there are times when the required software is not available in the official package repository, and we must download the DEB package file from the official website of this software and manually install it in our Ubuntu / Debian operating system.

Install Deb package on Linux

In this article, I am going to show you how to install a DEB file in Ubuntu. I will use Ubuntu 20.04 LTS for demonstration. Let’s start.

Installing the DEB file from the command line:

You can use the dpkg command in Ubuntu to install the DEB file.

I downloaded the Albert search launcher DEB file for demonstration purposes only.

Open Terminal in the same directory as your DEB file.

Now install it with the following command:

sudo dpkg -i albert_0.16.1_amd64.deb

As you can see, the installation failed because it was not possible to resolve the dependencies. The DEB package depends on many dependencies, and they are not always installed automatically.

install deb linux

Now, to resolve the dependencies, you need to install these packages first before you can install the albert package.

Fortunately for us, dependency packages are available in the official Ubuntu package repository. Therefore, all we need to do is run the following command:

sudo apt -f install

As you can see, the APT package manager resolved all the dependencies automatically.

install albert deb

install albert

Sometimes dependency packages will not be available in the official Ubuntu package repository. In this case, you need to find the necessary DEB packages on the Internet and install them also with dpkg. You will also need to resolve any dependency that these dependency packages will have. This gets harder and harder as dependencies increase and is very impractical for DEB files that have many dependencies.

Installing a DEB file using the Ubuntu Software Center:

You can also install the DEB file using the Ubuntu Software Center App Store. Just right-click on the DEB file and select “Open with software installation.”

install deb package

Now click on Install.

install deb

Dependencies should be automatically resolved if they are available in the Ubuntu package repository and software must be installed.

If any dependency package is not available in the official Ubuntu package repository or in any of the package repositories you added through PPA, the installation will fail. In this case, you will also need to find and install the dependency packages manually.

Installing a Deb package using Gdebi

There is also a very useful tool like gdebi. The advantage of using gdebi over the dpkg command above is that gdebi automatically downloads and installs all the necessary dependencies. If gdebi is not already installed on your system, you can install it by running the following command in the terminal:

sudo apt install gdebi gdebi-core

To install deb package using gdebi, you can use the terminal

sudo gdebi package.deb

Or the context menu of the file manager by right-clicking on the .deb file

install deb gdebi

How do you install DEB on Ubuntu?