How to Install Deb File in Linux

Abid Ullah Feb 02, 2024
  1. Install a DEB File Manually in Linux
  2. Install a DEB File Using the Terminal in Linux
  3. Remove a DEB File Using the Terminal in Linux
How to Install Deb File in Linux

In this Linux article, we will learn how to install a .deb(Debian Software Package) file on a Linux system. We will also see how to remove a .deb file after installing it.

More importantly, we will learn different methods to install a .deb file on a Linux system.

Install a DEB File Manually in Linux

We can install a .deb file by simply clicking on the file and choosing the install package option.

First, we need to download a .deb file. Let’s say we want to install slack.deb on our Linux system.

Downloading slack .deb file on Linux system

After we downloaded the slack.deb file, we double-click on the file, which will load the package’s contents. Once the package contents are loaded, we need to click on the install button, as shown in the image.

Install the slack file

It is one of the ways in which we can install a .deb file using a graphical desktop(GUI).

Install a DEB File Using the Terminal in Linux

If we want to install a .deb file using the terminal in Linux, then the dpkg command can help us to install .deb files.

First, we open the terminal. Then we need to change our current directory to the downloads where our slack.deb file is stored.

We use this command to change the directory.

$ cd \Downloads

Changing current directory to downloads

After this, we need to use the following command and hit the enter button. The following command will execute the .deb slack file and install the package in our Linux system.

$ sudo dpkg -i slack.deb

Installing .deb slack file using terminal

The system will ask the user to enter the administrator password before installing the slack.deb file begins.

Remove a DEB File Using the Terminal in Linux

With the help of the dpkg command, we can remove a .deb file in the Linux system. We can remove the slack.deb package using the following command on Linux.

$ sudo dpkg remove slack.deb

Running the command above in the terminal will successfully remove the slack.deb file.

I hope you find this article helpful in understanding how to install a .deb file on a Linux operating system.

Author: Abid Ullah
Abid Ullah avatar Abid Ullah avatar

My name is Abid Ullah, and I am a software engineer. I love writing articles on programming, and my favorite topics are Python, PHP, JavaScript, and Linux. I tend to provide solutions to people in programming problems through my articles. I believe that I can bring a lot to you with my skills, experience, and qualification in technical writing.

LinkedIn