Install Deb File in Linux

  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

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.

Install Linux Bash on Windows 10 (W...
Install Linux Bash on Windows 10 (Windows Subsystem) | SSH Course Part 1 (Depreciated)

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.