Javatpoint Logo
Javatpoint Logo

How to install deb file in Ubuntu

Deb is a format of installation package which is used by every Debian-based Distros.

The repositories of Ubuntu include lots of deb packages that could be installed either by the command line with the help of apt-get and apt utilities or by the Ubuntu Software Center.

Several applications are not added inside the Ubuntu or third-party repositories. These applications need to be downloaded through the websites of the developer and manually installed. We need to be careful while installing such packages through any unofficial sources or websites.

Introduction to Deb file in Ubuntu

Some softwares are existed by deb packages. These packages are the archived files that finish with the extension, i.e., .deb.

We can assume a .deb file as a .exe file within Windows. When we double-click over the .exe file, it will start the installation process in Windows. In Ubuntu, deb packages are quite the same.

Troubleshoot: Double-click on the deb file that does not open inside the Software Center in the 20.04 version of Ubuntu.

It is weird but could easily be resolved. We have to right-click over that deb file and select the option, i.e., "Open With". We can select open with the Software Install option as the default selection.

Download the deb file

We are downloading and installing the TeamViewer deb file for the aims of the demonstration. The TeamViewer can be defined as an all-in-one key for file transfer among computers, online meetings, desktop sharing, and remote support.

Launch our web browser and connect to the TeamViewer for the download page of Linux. We can download the package of deb by pressing on the download link of Debian and Ubuntu.

If we prefer the command line, we can download our deb file by using curl or wget.


How to install deb file in Ubuntu

Or,

Install the deb file by using the command line

If we want to install the deb packages by using the command line, we have various tools at our disposal. We will show how to apply the dpkg, gdebi, and apt utilities for installing deb packages.

1. Install the deb file by using the apt utility

apt can be defined as a utility of command line to install, update, remove, and otherwise manage various deb packages on Ubuntu, Debian, and other related distributions of Linux.

The apt utility was announced in the 14.04 version of Ubuntu and includes the most widely used commands through apt-cache and apt-get.

For installing local packages of deb by using apt, we need to give the complete path to the deb file.

When the file is placed in our current working directory, then rather than providing the absolute path we can ./ prepend before the name of the package. Otherwise, the apt utility will try to install and retrieve the package through the repositories of Ubuntu.

We will be requested for typing Y to continue.

After that, the package manager of apt will fix and install every package dependencies.

How to install deb file in Ubuntu

2. Install deb files by using gdebi

gdebi can be described as a tool to install local deb packages. By default, it's not installed in Ubuntu, however, we can install these packages by using the below command:


How to install deb file in Ubuntu

For installing the deb packages by using gdebi, we need to type:

When prompted type y and gdebi would fix and install the deb files and every dependency for us.

How to install deb file in Ubuntu

3. Install deb files by using dpkg

dpkg can be defined as a package manager (low-level) for all the Debian-based systems. We can apply the -i option or --install option for installing deb packages by using dpkg.


How to install deb file in Ubuntu

dpkg does not resolve the dependencies, unlike gdebi and apt. If we find any errors of dependency during the installation of deb packages, we can apply the below command of apt for resolving and installing every package dependency:

4. Install the deb packages with GUI

Simply, we can download the deb file and start it with a double click if we prefer to apply the graphical interface.

It will open a default distro Graphical Software Center:

Press on the install button and a dialog box will open, i.e., Authenticate:

We have to type the administrative password and press over the Authenticate button.

GUI mode

If we wish to apply GUI GDebi, we can follow the below steps:

  • Open up the file manager and position the package. We can see it in Downloads in most of the cases.
  • Right-click over the deb files and select the "Open With Other Application"
    How to install deb file in Ubuntu
  • After doing the above step, a new dialog box will open along with the group of Recommended Applications. Select the GDebi Package Installer and press on Select.
    How to install deb file in Ubuntu

This installer will load all the deb packages and display the software description (if existed) and whether each dependency is satisfied. Press on the Install Package, input inside the password, and press the Authentication button for starting the installation process.

The process of installation might take some time based on the size of the file and its other dependencies.

The button, i.e., "Install" inside the Ubuntu Software Center would modify to "Remove" when the deb file is installed.

That's all, our application has been successfully installed on our system and we can begin using it.

How to install deb file in Ubuntu

Removing deb files

Consider the below methods to remove the deb files.

1. Uninstall the deb file with Software Center

We can delete the package by opening the terminal window even if we have successfully installed the package with the Software Center and executing the below command:

2. Removing Software by dpkg

We can use the official name of the dpkg package in the below command when deleting packages that are installed by it:

3. Removing Software by Gdebi

For uninstalling the software by Gdebi, we have to open the Package Installer of Gdebi and press on Remove Package.

How to install deb file in Ubuntu
Next Topic#




Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA