How to install deb files (packages) on Ubuntu

s2 0

Deb is the installation package format used by all Debian-based distributions.

The Ubuntu repositories contain thousands of Deb packages that can be accessed either from the Ubuntu Software Center or from the command line with the apt and apt-get Utilities.

Many applications are not in Ubuntu or other third-party repositories. These applications must be downloaded from the developers’ websites and installed manually. Be especially careful when installing deb packages from unofficial sources.

In this tutorial, we are going to explain how to install deb files on Ubuntu 18.04. The same instructions apply to Ubuntu 16.04 and any Debian-based distribution, including Debian, Linux Mint, and Elementary OS.

Download deb files

For demonstration purposes we will download and install the TeamViewer Deb file. TeamViewer is an all-in-one solution for remote support, desktop sharing, online meetings and file transfer between computers.

Start your web browser and navigate to TeamViewer for Linux Download page
. Download the Deb package by clicking the Ubuntu and Debian download link.

If you prefer the terminal, you can download the deb file with it wget
or curl

wget --no-check-certificate
curl -k -O -L

Install deb files from the command line

When it comes to installing deb packages from the command line, there are several tools available to you. In the following sections we will show you how to use it apt, gdebi, and dpkg Utilities for installing deb packages.

Installing deb files with apt


is a command line utility for installing, updating, removing, 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 apt-get and apt-cache.

How to install local deb packages with apt You must provide the full path to the deb file. If the file is in your current working directory instead of entering the absolute path, you can prepend ./ before the package name. Otherwise, apt will try to get the package from the Ubuntu repositories and install it.

sudo apt install ./teamviewer_amd64.deb

You will be asked for input Y keep going:

0 upgraded, 84 newly installed, 0 to remove and 64 not upgraded.
Need to get 21.0 MB of archives.
After this operation, 66.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

the apt The package manager will resolve and install all package dependencies.

Installing deb files with gdebi

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

sudo apt install gdebi

How to install the deb package with gdebi Type:

sudo gdebi teamviewer_amd64.deb
Do you want to install the software package? [y/N]:

Type y when prompted and gdebi will resolve and install the deb package and all of its dependencies for you.

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 ./teamviewer_amd64.deb

not how apt and gdebi, dpkg does not resolve any dependencies. If you get dependency errors while installing deb packages, you can use: apt Command to resolve and install all package dependencies:

sudo apt install -f

Install deb packages with GUI

If you prefer a graphical interface, just download the deb file and double-click to open it.

This will open the Standard Distribution Graphical Software Center:

Click the Install button and the Authenticate dialog box will open.

Enter the administrator password and click the Authenticate button.

The installation can take some time depending on the file size and its dependencies. Once the Deb package is installed, the “Install” button in the Ubuntu Software Center will change to “Remove”.

That’s all, the application has been installed on your system and you are ready to use it.


We showed you how to install local deb files in Ubuntu. If you’re installing packages from the command line, use apt as it resolves and installs all package dependencies.

Feel free to leave a comment if you have any questions.