4 Ways to Install deb Files in Ubuntu [Beginner’s Guide]

3 min


This absolute beginner’s guide explains the steps required to install deb (*.deb) files in Ubuntu. This applies to all Ubuntu-based Linux distributions such as Linux Mint, elementary OS, etc.

What is .deb file?

The .deb files are the software package format used by Debian and its derivatives such as Ubuntu, Linux Mint, elementary, etc. These files are archive files consists of control and installation packages. Any source code can be packaged as .deb using certain methods and the output file can be installed in target systems provided dependencies are satisfied.

The .deb files support GPG signatures for verification while they can be converted to other package formats as well such as .rpm using alien.

Install deb files in Ubuntu and Other Derivatives – 4 Methods

There are several ways to install deb files in Ubuntu. We will explain 4 different steps for absolutely new users.

1. GUI Method using Software [Recommeneded for Ubuntu users]

This is probably the easiest method to install .deb files in Ubuntu. It uses the in-house Software tool. Browse to the .deb file location using the file manager. Right-click on the .deb file and click ‘Open with the software install’.

Open with Software in Ubuntu
Open with Software in Ubuntu

Wait for the Software to open, then click Install.

After the installation is finished, you can find the application in the app grid.

2. Terminal Method using GDEBI Package Manager

Install deb files using gdebi
Install deb files using gdebi

The gdebi package manager is a super handy tool to install any .deb files in Ubuntu. The advantage of using gdebi is that it resolves all the dependencies and installs them for you, automatically.

The gdebi package manager is not installed by default in Ubuntu. You have to install it separately. Open a terminal and run the below command to install gdebi.

sudo apt install gdebi

Once installed, browse to the location of the .deb file via the terminal and run the following command. Change the path and package name as per your application.

sudo gdebi /path/package_name.deb

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

3. Install deb files using dpkg Package Manager

The legacy dpkg can also be used to install .deb files. You can use its switch “-i” to install any .deb package. The dpkg is already installed by default in all Debian-based systems.

sudo dpkg -i /path/package_name.deb

However, dpkg may give you a dependency error while installing the package. If it gives such an error, then run the following command to install the pending dependencies.

sudo apt-get install -f

That would conclude the .deb file installation using dpkg.

SEE ALSO:   How to Migrate to Fedora Linux from Ubuntu [Beginner's Guide]

4. Install deb files using apt

Install deb files using apt
Install deb files using apt

Using the default apt package manager also you can easily install any .deb file. The apt package manager is a powerful utility and you can do many things with it. That said, to install any .deb package using apt use any of the following commands.

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

Make sure to change the path and package name as per your package name.

How to uninstall .deb file package

Uninstalling an installed deb package requires the actual installed package name. And that is different (in most of the cases) than the actual .deb file name. So, to find out the installed package name use the following command.

dpkg -I package_name.deb

Then using the package name, follow any of the below commands to remove it from your system.

sudo apt remove package_name
sudo dpkg -r package_name
Remove package using dpkg
Remove package using dpkg

Also, as the last step, you can use the autoremove of apt package manager to remove any unwanted package that may have been there in your system when you installed the package using the above commands,

sudo apt autoremove

Closing Notes

I hope this absolute beginner’s guide helps you to know various ways to install a .deb file in Ubuntu and other similar derivatives. Armed with this basic knowledge, you can explore further using man pages of these utilities.

Cheers.


We bring the latest tech, software news and stuff that matters. Stay in touch via Telegram, Twitter, YouTube, and Facebook and never miss an update!

Join our Telegram channel and stay informed on the move.

Also Read


Like it? Share with your friends!

Arindam

Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, or send us an email.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x