3 Ways to Install Deb Files on Ubuntu [& How to Remove Them Later]

This beginner article explains how to install deb packages on Ubuntu. It also shows you how to remove those deb packages afterward.
Warp Terminal

Got an application in .deb file format and wondering how to install it in Ubuntu?

You can think of .deb files as .exe files in Windows. You double-click on the .exe file and it starts the installation procedure in Windows. Deb packages are pretty much the same.

📋
Double click on the downloaded .deb file and it starts the installation process in the software center.

You can find these deb packages in the download section of a software provider’s website. For example, to install Google Chrome on Ubuntu, you download the Chrome deb package from its website, double-click on it and it is installed.

That's one way of doing things. There are other ways, too.

In this tutorial, I'll share how to install .deb files in Ubuntu and how to remove the applications installed this way.

Installing .deb files on Ubuntu and Debian-based Linux Distributions

You can choose a GUI or command-line tool for installing a deb package. The choice is yours. Let’s go on and see how to install deb files.

Method 1: Use the default Software Center

The simplest method is to use the default software center in Ubuntu. Here's how you achieve that.

Step 1:

Go to the folder where you have downloaded the Deb file. It is usually the Downloads folder.

Right click on the deb file and select Open With...

Right click on the deb file and select Open With option

Step 2

In the window that pops up now, Select 'Software Install', check the 'Always use for this file type' option at the bottom and then click the 'Open' button.

Opening deb files with Ubuntu Software Center

Step 3

It will open the software center, where you should see the option to install the software. All you have to do is hit the install button.

Installing deb file in Ubuntu Software Center

It will ask for your account password. It's the same password you used to login to the system.

Enter account password when asked while installing the Deb package from software center in Ubuntu

Once you enter the password, you'll see that the deb package is now being installed.

Deb package being installed in Ubuntu software center

A few seconds later, the software would have been installed as it starts showing the uninstall option now.

Software installed
DON'T Click the trash icon otherwise it will remove the newly installed software

Congratulations! You have successfully installed an application from the Deb file. That was not too hard, right?

💡
From next time onward, you just have to double-click on the downloaded deb file and it will be opened in the software center from where you can easily install it.

Method 2: Use GDebi for installing deb packages

There is a legacy but lightweight tool Gdebi that allows you to install the deb files in Debian-based distributions. It is also slightly better equipped to handle dependency issues.

You can install GDebi deb package installer from the software center or using the command below:

sudo apt install gdebi

You can use it in a similar fashion that you saw with Software Center.

Right-click on the deb file and select the 'Open with GDebi Package Installer' option.

gdebifinal
Install with gdebi

It is a lightweight application, so the installation seems quicker. You can read in detail about using gDebi and making it the default for installing DEB packages.

Use GDebi for Quickly Installing DEB Packages in Ubuntu
Gdebi is a tiny little app that helps you install deb files more effectively by handling dependencies. Learn how to use Gdebi and make it the default application for installing deb packages.

Method 3: Install .deb files in the command line

If you want to install deb packages in the command line, you can use either the apt command or the dpkg command. The apt command uses the dpkg command underneath it, but apt is more popular and easier to use.

If you want to use the apt command for deb files, use it like this:

sudo apt install path_to_deb_file

If you are in the same directory where the deb file is located, use it like this:

sudo apt install ./deb_file

For example, for the , deb file I had downloaded, here's how the command line installation looks like:

Installing deb file in command line

Alternatively, you can use the dpkg command for installing deb packages, here’s how to do it:

sudo dpkg -i path_to_deb_file

In both commands, you should replace path_to_deb_file with the path and name of the deb file you’ve downloaded.

💡
If you get a dependency error while installing the deb packages, you can use the following command to fix it: sudo apt install -f

How to remove deb packages

Removing a deb package isn’t a big deal, either. And no, you don’t need the original deb file you used to install the program.

All you need is the name of the program you’ve installed and then you can use the apt remove command with it.

sudo apt remove program_name

How do you find the exact program name you need to use in the remove command? The apt command has a solution for that as well.

You can find the list of all installed files with the apt command, but manually going through this will be a pain. So you can use the grep command to search for your package.

For example, I installed the RocketChat application in the previous section but if I want to find out the exact program name, I can use something like this:

sudo apt list --installed | grep chat

This will give me all the packages that have ‘chat’ in their name, and I can get the exact program name from there.

listapt
List Installed App with ‘chat’ in Name

As you can see, a program called ‘rocketchat’ is installed. Now you can use this program name with the apt remove command.

How to Uninstall Deb Packages in Ubuntu
Removing deb files might not be that simple but it’s not too complicated either. Here’s all you need to know about deleting deb packages from Ubuntu Linux.

What about updating the applications installed from deb files?

That depends on how the deb file was packaged.

Some deb packages (like Chrome) add theslves to the sources.list so that they can provide newer versions of software through system updates.

chrome edge update ubuntu
Chrome installed via deb file gets updated through system updater

But for most other software, you’ll have to remove the existing program and install the newer version.

For example, when you install Discord on Ubuntu from the deb file, every time there is a new version available, you download the new deb file, remove the existing one and install the new deb file.

Discord notifies about update
Discord update involves downloading new deb file

More ways of installing software in Ubuntu

Deb packages are just one of the several ways of installing new applications in Ubuntu. Here's a detailed guide for Ubuntu desktop users.

Install and Remove Applications in Ubuntu [Beginner’s Guide]
This detailed guide shows you various ways to install applications on Ubuntu Linux, and it also demonstrates how to remove installed software from Ubuntu.

Like Deb, there are AppImage packages, too. Unlike Deb, they are not installed on the system.

How to Use AppImage in Linux [Complete Guide]
What is AppImage? How to run it? How does it work? Here’s the complete guide about using AppImage in Linux.

Fedora's Flatpak packaging system cannot be ignored as well.

Install and Use Flatpak on Ubuntu
Ubuntu may come with Snap by default but you could still enjoy the Flatpak universal packages on it.

I hope this beginner’s guide helped you install deb packages on Ubuntu. I added the removal part so that you can have better control over your installed programs.

About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries 🕵️‍♂️

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

itsfoss happy penguin

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.