Guide on how to install Deb file packages on Ubuntu – Deb is the installation package format used by all linux distro Debian based.
Ubuntu repositories contains thousands of deb packages which can be installed either from the Ubuntu Software Center or from the command line (Command Line) with the utility
Many applications are not included in Ubuntu or 3rd party repositories. The application must be downloaded from the developer’s website and installed manually. And always be careful when you want to install deb packages from unofficial sources.
In this tutorial, I will explain how to install deb files package on Ubuntu 18.04. The same instructions apply for Ubuntu 16.04 and any Linux distribution based on Debian, including Debian, Linux Mint and Elementary OS.
Download the deb file
For demo purposes, in this tutorial, I will download and install a deb file TeamViewer on Ubuntu. TeamViewer, is a complete solution for remote support or remote, desktop sharing, online meetings, and file transfer between computers.
Please open your web browser and navigate to the TeamViewer for Linux download page. Download the deb package by clicking the Ubuntu and Debian download link.
If you prefer to use the linux terminal, you can download the deb file with
$ wget --no-check-certificate https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
curl -k -O -L https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
How to Install a deb File from the Command Line
When you want to install a
deb from the command line you have a few tools at your disposal. In the following sections, I will show you how to use the utility
dpkg to install the deb package.
Install the deb file with apt
apt is a command line utility to install, update, delete and manage deb packages on Ubuntu, Debian, and related Linux distributions. It was introduced in Ubuntu 14.04 and combines the most commonly used commands from
To install local deb packages with
apt, You need to provide the full path to the deb file. If the file is in your current working directory instead of typing the absolute path, you can add it first
./ before the package name. If not, apt will try to fetch and install packages from Ubuntu repositories.
$ sudo apt install ./teamviewer_amd64.deb
You will be asked to type
Y to continue:
Output ... 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]
A proper package manager will resolve and install all package dependencies.
How to install deb files with gdebi
gdebi is a tool for installing local deb packages. It is not installed by default on Ubuntu, but you can install it with the following command:
$ sudo apt install gdebi
To install a deb package of type
$ sudo gdebi teamviewer_amd64.deb
Output ... Do you want to install the software package? [y/N]:
y when requested and
gdebi will finish and install the deb package and all its dependencies for you.
How to install deb files with dpkg
dpkg is a low-level package manager for Debian-based systems. Use options
--install) to install deb packages with dpkg.
$ sudo dpkg -i teamviewer_amd64.deb
dpkg does not resolve dependencies. If you get dependency errors while installing deb packages you can use the following apt command to resolve and install all package dependencies:
$ sudo apt install -f
How to install Deb File Package using GUI
If you prefer to use a graphical interface, simply download the deb file and open it with a double click.
This will open the default Graphical Software Center distro
Click on the Install button and the Authentication dialog box will open.
Enter the administrative password and click the Authenticate button.
The installation may take some time depending on the file size and dependencies. After the deb package is installed, the Install button in the Ubuntu Software Center will change to Remove.
That’s all, the app has already been installed on your system and you can start using it.
I have shown you how to install local deb file packages on Ubuntu Linux OS.