3 Methods To Install Deb Files (Packages) on Ubuntu

In this article, learn how to install deb files (packages) on Ubuntu.

Let me explain first what is a Debian package, and what is it used for?

Deb is the installation package format used by all Debian based distributions. The Ubuntu repositories contain thousands of deb packages that can be installed either from the command line using the apt and apt-get utilities or from the Ubuntu Software Center.

Not all applications are available officially through Ubuntu or any 3rd party repositories. You have to download them from the developer’s websites and then install them manually.

You can think of .deb files as the .exe files in Windows. You double click on the .exe file and the installation procedure will start. DEB packages are much the same.

How To Install Deb Files on Ubuntu Linux

Installing deb Files on Ubuntu Linux

Downloading deb Files

You can download deb files (packages) from the download section of the software provider’s website. For example, if you want to install TeamViewer on Ubuntu, open your web browser and go to the TeamViewer for Linux download page

Now the question arises, how to install deb files (packages) on Ubuntu? There are several ways of installing DEB packages in Ubuntu. We will show them to you one by one in this post.

You may also like: How to remove deb packages on Ubuntu Linux

How To Install Deb Files on Ubuntu Linux

You can choose a command-line tool or a GUI tool for installing a deb package.

Method 1. Installing deb Files from the Command Line

1. Installing deb files with apt

apt is a command-line utility for installing, removing, updating and otherwise managing deb packages on Ubuntu, Debian, and related Linux distributions. It was introduced in Ubuntu 14.04 and combines the most commonly used commands from apt-cache and apt-get.

To install local deb packages with apt, you need to have the full path to the deb file. If the file is located in your current working directory instead of typing the absolute path, you need to prepend ./ before the package name. If not apt will attempt to retrieve and install the package from Ubuntu’s repositories.

If you want to use the apt command for deb files, use it like this:

sudo apt install path_to_deb_file

For example: sudo apt install ./teamviewer_amd64.deb

Type Y when prompted and apt will resolve and install the deb package and all its dependencies for you.

If you have a dependency error while installing the deb packages, you can use the following command to resolve and install all package dependencies:

sudo apt install -f

2. Installing deb files with gdebi

gdebi is a tool for installing local deb packages. It is not installed by default in Ubuntu, but you can install it with the following command:

sudo apt install gdebi

To install the deb package with gdebi type:

sudo gdebi path_to_deb_file

For example: sudo gdebi teamviewer_amd64.deb

You will be prompted to type Y to continue. The gdebi package manager will resolve and install all the package dependencies.

3. Installing deb files with dpkg

dpkg is a low-level package manager for Debian-based systems. Use the -i (or –install) option to install deb packages with dpkg.

sudo apt install path_to_deb_file

For example: sudo apt install ./teamviewer_amd64.deb

Unlike gdebi and apt, dpkg doesn’t resolve dependencies. If you get any dependency errors when installing deb packages, you may use the following apt command to resolve and install all package dependencies:

sudo apt install -f

Method 2. Use the default Software Center

The easiest way is to use the default software center in Ubuntu. Navigate to the folder where you have downloaded the .deb file (it should be the Downloads folder) and double click on this file to start installation.

The software center will open up and you should see the option to install the software. All you have to do is to click on the install button and give your login password.

Method 3. Use Gdebi application for installing deb packages with dependencies

Gdebi is a lightweight GUI application that has the sole purpose of installing deb packages. You can find Gdebi in Ubuntu Software Center. Just find it and install it from there.

Or, you can also install gdebi using command line. Open a terminal and use the following command:

sudo apt install gdebi

Here are the steps on how to use Gdebi for installing deb packages:

– Navigate to the download deb file. Right-click it and select Open with other applications.

– After that, select Gdebi Package Installer from the list of available applications.

– You’ll get to the option to install the deb package. Click on Install Package.

– Wait while the installation completes and then you can close the program.

If you prefer to use terminal more than the GUI applications, you can use gdebi in command line mode:

sudo gdebi <path_to_deb_file>

Hope something helps you.