Install a Deb File by dpkg or by APT on Debian / Ubuntu

In this guide, you will learn to Install a Deb File by dpkg or by APT on Debian / Ubuntu distros. A deb file is a software package file for Debian and Ubuntu. You can follow the steps below to see how to install a deb file on Debian distros in all versions such as Ubuntu 22.04 and Debian 12.

What is a Deb File Used For?

The deb file is used for installation packages that include software developed for computers that run on the Linux operating system using the Debian package management application.

What is the difference between apt and dpkg?

APT is a front-end to dpkg that is more user-friendly. dpkg handles individual package activities, APT handles package relationships, as well as the sourcing and administration of higher-level versioning choices.

Steps To Install a Deb File by dpkg or by APT on Debian / Ubuntu

To complete this guide, you must have access to your server as a non-root user with sudo privileges. For this purpose, you can visit the Debian Initial Guides on the Orcacore website.

Then, follow the steps below.

Step 1 – Install Deb Files with dpkg on Debian / Ubuntu

The dpkg is already installed by default in all Debian-based systems. You can use its option “-i” to install any deb files. The syntax is shown below:

sudo dpkg -i /path/package_name.deb

However, dpkg may give you a dependency error while installing the package.

dpkg: error processing package

If you get this error, then run the following command to install the pending dependencies:

sudo apt install -f

Then, install your deb package again.

Step 2 – Install Deb Files with APT on Debian / Ubuntu

At this point, you can easily install any deb files with Apt on Debian.

To install deb files with APT, you can use one of the following commands:

# sudo apt install ./package_name.deb
# sudo apt install /path/package_name.deb

Step 3 – Install Deb Files with GDEBI on Debian / Ubuntu

Also, there is another way to install a deb file. GDEBI is a package installer to install Debian executable packages on the Debian-based distribution of Linux. 

The Gdebi package manager is not installed by default in Debian. To install it, run the command below:

sudo apt install gdebi -y

When your installation is completed, you can use it to install any local deb file.

sudo gdebi /path/package_name.deb

The above command will install the deb file for you automatically.

That’s it, you are done.


At this point, you have learned to Install a Deb File by dpkg or by APT on Debian / Ubuntu distros. Also, you can use another package manager named Gdebi to install the deb packages on your Debian distros.

Hope you enjoy it. You may be interested in these articles:

Install Gnome Desktop Environment on Debian 12

Install MySQL on Debian 12 Bookworm

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *

Stay informed and not overwhelmed, subscribe now!