Read in 4 minutes
How to Install Deb Packages on Ubuntu
Deb is the installation package format used by all Debian based distributions. Deb packages can be installed and uninstalled using either the command line or the graphical package manager.
In this tutorial we will explain how to install debian
.deb packages on Ubuntu 18.04. The same instructions apply for Ubuntu 16.04 and any Debian based distribution, including Debian, Linux Mint and Elementary OS.
Before You Begin
The Ubuntu repositories contain thousands of deb packages which can be installed from the Ubuntu Software Center. If you prefer to install from the command line you can use the
apt command line utility.
But there are applications that are not included in the Ubuntu or any 3rd party repositories. Those applications have to be downloaded from the developers website and installed manually.
Be extra careful careful when installing deb packages from unofficial sources.
Downloading deb Packages
For the purposes of demonstration, in this tutorial 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.
Launch your web browser and navigate to the TeamViewer for Linux download page. Download the deb package by clicking on the Ubuntu and Debian download link.
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
Installing deb Packages from the Command Line
When it comes to installing deb packages from the command line you have several tools at your disposal. In the following sections we will show you how to use
dpkg utilities to install deb packages.
Installing deb packages with apt
APT (Advanced Package Tool) is a command-line interface for the package management system. 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 package. If the package is located in your current working directory instead of using the absolute path you can prepend
./ before the package name. Otherwise
apt will try to retrieve and install the package from the Ubuntu’s repositories.
sudo apt install ./teamviewer_amd64.deb
You will be prompted to type
Y to continue:
... 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]
apt package manager will resolve and install all the package dependencies.
Installing deb packages with gdebi
gdebi is a tool for installing local deb packages. It is not installed by default in Ubuntu, but you can install it from the Ubuntu Software Center or using the following command:
sudo apt install gdebi
You can now install deb packages with
gdebi by typing:
sudo gdebi teamviewer_amd64.deb
... Do you want to install the software package? [y/N]:
y when prompted and
gdebi will resolve and install the deb package and all its dependencies for you.
Installing deb packages with dpkg
dpkg is a low level package manager for Debian-based systems. Use the
--install) option to install deb packages with
sudo dpkg -i teamviewer_amd64.deb
dpkg doesn’t resolve dependencies. If you get any dependency errors when installing deb packages you can use the following
apt command to resolve and install all package dependencies:
sudo apt install -f
Installing deb Packages 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 the default distro Graphical Software Center
Click on the Install button and the Authenticate dialog box will open.
Enter the administrative password and click on the Authenticate button.
The installation may take some time depending on the file size and its dependencies. Once the deb package is installed the Install button within the Ubuntu Software Center will change to Remove.
Thats all, the application has been installed on your system and you can start it from the applications menu.
In this tutorial you learned how to install local deb packages.
Feel free to leave a comment if you have any questions.