How to install a DEB file on Linux
Are you new to Debian Linux, Ubuntu, or a Linux operating system that uses DEB files? Do you want to install a DEB file on your system but can’t figure it out? Follow this guide to learn how to install a DEB file on Linux.
Installing a DEB file with Apt
Perhaps the best way to install a DEB file on a Linux operating system that supports DEBs is with the Apt package manager. Why? Apt automatically resolves and handles dependencies, which other command-line tools do not.
Install a DEB package on Linux with the Apt package manager. Start by downloading the DEB package to your computer. Once it is downloaded, open up a terminal window.
Unsure about how to open up a terminal window? Press Ctrl + Alt + T on the keyboard. Or, search for “Terminal” in the app menu and launch it that way. Use the cd command to enter the “Downloads” folder with the terminal open.
cd ~/Downloads/
Once in the downloads folder, run the ls command to view the DEB package filename.
ls *.deb
Finally, install the DEB package on your computer using the apt install command.
sudo apt install ./name-of-deb.deb
Need to install more than one DEB package at a time? The apt install command can do that too! Run the apt install command as before, but add a wildcard (*).
sudo apt install ./*.deb
Installing a DEB file with Dpkg
While the Apt package manager is terrific and makes installing and setting up DEB files on Linux very easy, it isn’t the only way to install DEB files on Linux. There’s also the Dpkg tool.
The Dpkg tool is used extensively on Debian, Ubuntu, and every other Debian/Ubuntu-based operating system. To install a DEB file using this tool, do the following.
First, enter the “Downloads” folder where you’ve downloaded the DEB file.
cd ~/Downloads/
Once inside of the “Downloads” folder, run the ls command to view the contents of “Downloads” to get the name of the DEB file.
ls *.deb
When you’ve located the DEB package file name, install it using the dpkg -i command.
sudo dpkg -i my-deb-package-file.deb
Keep in mind when you install a DEB package using the dpkg -i command, the dependencies for the DEB will not be automatically resolved. Instead, you need to run the apt-get install -f or apt install -f command to fix this.
sudo apt install -f
Or, if you use Debian Linux:
sudo apt-get install -f
Once the command above is run, your package manager will automatically correct all of the dependency issues on your system caused by installing the DEB package.
Installing a DEB file with Gdebi
If you’d prefer to install a DEB package with a GUI, you can with the Gdebi app. However, the Gdebi app must be installed first, and you can install that with a terminal window.
Open up a terminal window on the Linux desktop by pressing Ctrl + Alt + T on the keyboard. Alternatively, search for “Terminal” in the app menu and launch it.
Once the terminal window is open, use the apt install or apt-get install command to install the Gdebi app.
sudo apt install gdebi
With the Gdebi app installed, open up the Linux file manager. When the Linux file manager is open, find a DEB file you wish to install and right-click on it. After right-clicking on it, select the “Open With Other Application” option.
Select the “Open With Other Application” option and choose “Gdebi.” Gdebi will open an installer for the desired DEB package when you select this option.
With Gdebi’s installer open, follow the step-by-step instructions to install your DEB file on Linux.
Step 1: Select the “Install Package” button inside the Gdebi app. When you select this button with the mouse, a pop-up window will appear on the screen. This pop-up window says, “Authentication required.”
Step 2: Enter your username’s password in the “Authentication required” pop-up window. A second pop-up window will appear when you’ve finished entering your password.
This pop-up window will install your DEB file on Linux. Be patient, as the installation may take a couple of minutes.
Step 3: When the DEB file installation is complete, the installer pop-up will say, “Installation finished.” Select the “Close” button to close the installation window. You can then close the Gdebi window.
Uninstall packages with Gdebi
It is possible to uninstall packages with Gdebi. To do it, select the DEB file you installed previously with Gdebi.
After re-opening Gdebi, find the “Remove Package” button and click on it with the mouse. When you select this button, a pop-up window will appear. Enter your password to uninstall the package from your computer.