Deb file is a format of installation used in Debian-based distributions, which is a software package that contains executable files. Debian is a fast and stable distribution of Linux that is more secure than other package managers. Installation of deb files in Ubuntu 22.04 (or later versions) is simpler and managed by the deb package manager, which is easy to manage by the user.
In this guide, different methods to install “.deb” files will be discussed and how to remove them from our system. This guide serves the following outcomes:
- What are the 3 Ways to Install Deb Files on Ubuntu?
- How to Remove Deb Files on Ubuntu?
3 Ways to Install Deb Files on Ubuntu
The Deb files can be installed on Ubuntu in multiple ways, but this guide will discuss the following 3 methods.
1. Using the Default Software Center
Installing the “.Deb” files on Ubuntu using the “Default Software Center” is the simplest method. To use this method, we have to go through these steps:
Right Click on the deb file and open with the “Open With Other Application” option:
After that, a new window will open. Choose the “Software Install” option and click on “Select”:
Now, start installing by clicking the “Install” option:
Before installing, provide an authentication password:
After that, it will take some time, and the deb file will be installed successfully.
2. Using apt Package Manager
In this method, we will use the default package manager apt to install a deb file on Ubuntu. For instance, we are installing the “.deb” file of TeamViewer using the apt manager as follows:
$ sudo apt install ./teamviewer_amd64.deb
3. Using dkpg Package Manager
Another method to install deb files is by utilizing the dkpg manager. Use the below-mentioned command to install “TeamViewer” using its deb file:
$ sudo dpkg -i teamviewer_amd64.deb
These were all the most used methods to install deb files on Ubuntu. Let’s explore the methods to remove Deb files.
What are the Possible Ways to Remove a Deb File on Ubuntu?
Similar to installation files, we can remove deb files from Ubuntu 22.04 utilizing different methods. Let’s dig into them one by one:
1. Using apt Package Manager
To remove the .deb file named “teamviewer”, execute the below command:
$ sudo apt remove teamviewer
The output shows the successful removal of the Deb file from the system.
2. Using the dpkg Package Manager
In this method, we will remove the deb file using the dpkg package manager. To remove the deb file (in our case, it’s TeamViewer), run the following command:
$ sudo dpkg -r teamviewer
As the output shows, you have successfully removed the deb file using the dpkg command.
That’s the end of this guide.
To install a .deb file on Ubuntu, there are three different methods; the default software manager, the apt package manager, and the dpkg command. Moreover, the “sudo apt install <deb-file>” using the apt package manager and “sudo dpkg -i <deb_file>” commands using the dkpg manager to install a deb file on Ubuntu 22.04. Similarly, the removal of .deb files from Ubuntu 22.04 is performed using apt and dpkg manager.