3 Ways to Install Deb Files on Ubuntu & Remove Them Later (2024)

3 Ways to Install Deb Files on Ubuntu & Remove Them Later (1)

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...

3 Ways to Install Deb Files on Ubuntu & Remove Them Later (2)

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.

3 Ways to Install Deb Files on Ubuntu & Remove Them Later (3)

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.

3 Ways to Install Deb Files on Ubuntu & Remove Them Later (4)

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

3 Ways to Install Deb Files on Ubuntu & Remove Them Later (5)

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

3 Ways to Install Deb Files on Ubuntu & Remove Them Later (6)

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

3 Ways to Install Deb Files on Ubuntu & Remove Them Later (7)

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.

3 Ways to Install Deb Files on Ubuntu & Remove Them Later (8)

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 UbuntuGdebi 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.It's FOSSAbhishek Prakash

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:

3 Ways to Install Deb Files on Ubuntu & Remove Them Later (11)

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.

3 Ways to Install Deb Files on Ubuntu & Remove Them Later (12)

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 UbuntuRemoving 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.It's FOSSAbhishek Prakash

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.

3 Ways to Install Deb Files on Ubuntu & Remove Them Later (15)

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.

3 Ways to Install Deb Files on Ubuntu & Remove Them Later (16)

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 toinstall applications on Ubuntu Linux,and it also demonstrateshow to remove installed software from Ubuntu.It's FOSSAbhishek Prakash

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.It's FOSSAbhishek Prakash

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

Install and Use Flatpak on UbuntuUbuntu may come with Snap by default but you could still enjoy the Flatpak universal packages on it.It's FOSSAbhishek Prakash

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.

3 Ways to Install Deb Files on Ubuntu & Remove Them Later (2024)
Top Articles
Latest Posts
Article information

Author: Golda Nolan II

Last Updated:

Views: 5640

Rating: 4.8 / 5 (58 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Golda Nolan II

Birthday: 1998-05-14

Address: Suite 369 9754 Roberts Pines, West Benitaburgh, NM 69180-7958

Phone: +522993866487

Job: Sales Executive

Hobby: Worldbuilding, Shopping, Quilting, Cooking, Homebrewing, Leather crafting, Pet

Introduction: My name is Golda Nolan II, I am a thoughtful, clever, cute, jolly, brave, powerful, splendid person who loves writing and wants to share my knowledge and understanding with you.