Beginner's Guide

How To Install DEB Package On Ubuntu 20.04 and Ubuntu 21.04

Pinterest LinkedIn Tumblr

In this tutorial post, we are going to learn the method to install .deb package on Ubuntu 20.04 and Ubuntu 21.04, and in its derivatives. This post is intended for the beginner level of users who might have just migrated to Linux (Ubuntu) from Windows or OS X. Files with deb extensions are a Debian packages.

install a deb file, by dpkg -i or by apt

Install Deb Package Using Dpkg Command in Ubuntu 20.04

Well, Let’s jump into the method to install .deb file in Ubuntu 20.04 and Ubuntu 21.04, Dpkg is a package manager for Debian. Ubuntu, Linux Mint and derivatives are based on Debian system.

To install a .deb file in Ubuntu 20.04 LTS, run the following command with the -i flag.

$ sudo dpkg -i package-name.deb

For example.

$ sudo dpkg -i  openshot.deb

Sometime you might encounter the error like this:

dpkg: error processing package 

Don’t panic if you see such error. It’s a dependency errors. To resolve this error, run the following command:

$ sudo apt install -f

To remove the installed software, run the following command:

$ sudo dpkg -r package-name       [It Will Remove Package Only ]
$ sudo dpkg --purge package-name  [It Will Remove Package And Configuration Files]

Now, Let’s try another method to install deb file in Ubuntu/Mint/Derivatives.

Install Deb Package Using Apt Command in Ubuntu 20.04

Run the following command to install any .deb file in Ubuntu 20.04 and Ubuntu 21.04, Meanwhile, The trick in this method is that you need to mentioned a local relative or absolute path of the file.

$ sudo apt install ./deb-package.deb
$ sudo apt-get install ./deb-package.deb

If you want to remove the installed using Apt command:

 sudo apt-get remove package-name
$ sudo apt-get purge package-name
OR
$ sudo apt remove package-name
$ sudo apt purge package-name

At last,

Install DEB Package using gdebi in Ubuntu 20.04

gdebi is a command-line tool for installing local deb packages Ubuntu 20.04 and Ubuntu 21.04, It automatically download and install all the required prerequisite packages. Run the following command to install .deb file.

$ sudo gdebi deb-package.deb

To remove package using gdebi command:

$ sudo apt purge package-name
OR
$ sudo apt-get purge package-name
OR
$ sudo dpkg --purge package-name

How to Install and Configure OpenCV on Ubuntu 20.04

Write A Comment