• Start Here
    • How to Install Linux
    • Which Distro To Choose
    • 10 Best Linux Distributions of 2023
  • Distros
    • Ubuntu
  • Linux Commands
  • Virtualization
  • Open Source
Linux Start
  • Start Here
    • How to Install Linux
    • Which Distro To Choose
    • 10 Best Linux Distributions of 2023
  • Distros
    • Ubuntu
  • Linux Commands
  • Virtualization
  • Open Source
Linux Start
Home»Distros»Ubuntu»How To Install Deb Files On Ubuntu

How To Install Deb Files On Ubuntu

Anup ThapaBy Anup ThapaMarch 19, 2023 Ubuntu 3 Mins Read

Ubuntu primarily has free and open-source software in its repositories. Some proprietary software can be installed directly from the repos, whereas you’ll have to download the deb package and perform a local install for others.

Opening a deb file takes you inside the archive and lists the contents rather than installing the package. If you’re new to Linux and haven’t dealt with deb files before this, this behavior can be confusing. 

To install deb files, you have to use a package management tool like dpkg or apt. You can also use their graphical frontends like GDebi or the Ubuntu Software Installer.  

Install Deb Files Graphically

For newer users, installing deb files with the Ubuntu Software app will feel most intuitive as the process is similar to other platforms. We’ll install TeamViewer as an example here.

  1. Right-click the deb file and select Open with another application.
    deb file open with another app
  2. Select Software Install and press Enter.
    debian package software install
  3. This’ll open the program’s page in the Ubuntu Software app with the local deb file as the source. Click on Install here and provide your password for authentication.
    deb package software install
  4. And that’s it. You can now search and launch the installed package from the applications menu.
    launch teamviewer applications menu

Use Apt to Install Deb Files

The Ubuntu Software app is just a GUI frontend to APT (Advanced Package Tool). Apt, in turn, is a high-level frontend to dpkg, but more on that later. For now, here’s the basic syntax for installing a deb file with apt.

sudo apt install /path/to/package.deb
sudo apt install /home/anup/Downloads/team_viewer_15.3.deb

If the package is in your current directory, you don’t need to specify the full path. You can just enter the package name like so

sudo apt install ./package.deb
sudo apt install ./discord-0.0.25.deb

When you run these commands, apt first downloads the necessary dependencies to prevent any dependency hell scenarios. Then, it invokes dpkg to install the files.

Install Deb Files With Dpkg

Since apt is just using dpkg under the hood to install deb files, you can directly use dpkg to do the same too.

sudo dpkg -i package.deb
sudo dpkg -i /path/to/package.deb

The only downside to this method is that dpkg doesn’t directly install dependencies. So, if you encounter any dependency errors, you’ll need to use apt with the fix-broken option to resolve it.

sudo apt install -f

You can run the install command again afterward to install the deb file like so

sudo dpkg -i discord-0.0.25.deb

Use GDebi to Install Deb Files

The Ubuntu Software app is easy to use and understand, but the installation can fail due to dependency errors. If you want a GUI-based method that also automatically handles dependencies, use GDebi.

sudo apt install gdebi -y

Right-click the deb file and select Open with another application like earlier.

But this time, select GDebi Package Installer and click on Install Package.

Anup Thapa
  • LinkedIn

Anup Thapa is a Linux enthusiast with an extensive background in computer hardware and networking. At LinuxStart, Anup is an integral part of our editorial team. His goal is to effectively communicate technical concepts in a simplified form understandable by new Linux users. To this end, he mainly writes beginner-friendly tutorials and troubleshooting guides. Outside of work, he enjoys experimenting with different Linux distros and reading up on things like networking and virtualization.

Leave A Reply Cancel Reply

Table of Contents
  • Install Deb Files Graphically
  • Use Apt to Install Deb Files
  • Install Deb Files With Dpkg
  • Use GDebi to Install Deb Files
Linux Start
Guides

What is the Linux Kernel?

The Linux Kernel is the core of the Linux operating system and is central to…

How To Install Linux Mint

How To Install Linux on VirtualBox

Getting Started with Linux

How to Install Linux

10 Best Linux Distros of 2023

Which Linux Distro Should You Choose? A Complete Guide to Help You Decide

© 2023 LinuxStart.com

Type above and press Enter to search. Press Esc to cancel.