Quick and easy ways to install DEB packages in Linux

Do you have a .DEB file that you need to install on Ubuntu, Debian, or Linux Mint? If you downloaded a DEB file for a program like Chrome from the web, you have several easy install options. If you prefer a graphical install method, you can use the Ubuntu Software tool to quickly install DEB files you downloaded from the web. Or, if you want to make sure you can easily install all dependencies for the program, try Gdebi, which has both graphical and command-line options. You can also use simple command line tools like Apt and Dpkg, which both come preinstalled on all Debian-based systems. We'll walk you through all 4 simple options for installing DEB files in Linux.

Things You Should Know

  • If you're using Ubuntu, you can double-click the DEB package and select "Install" for a quick graphical installation.
  • Use Gdebi to install a DEB package and all of its related dependencies with one simple command.
  • To install with Advanced Package Tool (apt), use sudo apt install ./filename.deb"
  • To install with Dpkg, use sudo dpkg -i filename.deb
Method 1
Method 1 of 4:

Using Ubuntu Software

  1. 1
    Double-click the .DEB file. If you're using Ubuntu, this method will guide you through one of the most straightforward ways to install DEB packages. Start by double-clicking the file in your file manager, which will instantly open the Ubuntu Software tool.
    • If that doesn't work, right-click the file and choose Open with software install.
    • If you run into trouble with dependencies when using this method, try using Gdebi instead.
  2. 2
    Click the Install button. If prompted, you may need to enter your password to complete the installation process. Once the software is installed, you'll find its name and icon in your app grid.
    • Having trouble finding your installed package? Just press the Super key (also known as the Windows key) on your keyboard, search for the application name, and then click it in the search results.
    • To uninstall a package, just launch Ubuntu Software, click Installed, choose the package you want to delete, and then click Remove.[1]
  3. Advertisement
Method 2
Method 2 of 4:

Using Gdebi Package Installer

  1. 1
    Install Gdebi if you haven't already done so. Gdebi is one of the most reliable ways to install DEB packages because of its ability to determine and resolve dependencies.[2] If Gdebi finds that the program requires other programs or libraries to run, the tool will also install those required files.
    • If you have Linux Mint, GDebi is already set up as your default package manager.
    • If you're using Ubuntu or Debian, you'll need to install Gdebi. On Ubuntu, you can get Gdebi from Ubuntu Software. On Debian (or if you prefer Apt in Ubuntu), use these steps:
      • Press Ctrl + Alt + T to open a terminal window.
      • Type sudo apt update and press Enter.
      • Enter your password when prompted.
      • Type sudo apt install gdebi and press Enter or Return.
  2. 2
    Open a terminal window. If you're logged into a shell account, just skip to the next step. Otherwise, you can press Ctrl + Alt + T to open a terminal window in most desktop environments.
    • If you're using Linux Mint, you can install the DEB file now through Gdebi by double-clicking it in your file manager and selecting Install Package.
    • If you're using Ubuntu or Debian and want to use the Gdebi GUI, open your file manager, right-click the DEB file, and select Open with Other Application. Choose Gdebi when prompted, and then click Install Package to complete the installation.
  3. 3
    Use cd to navigate to the directory with the DEB file. For example, if you saved the file to /home/username/Downloads, type cd /home/username/Downloads and press Enter.
  4. 4
    Type sudo gdebi filename.deb and press Enter. Replace filename.deb with the DEB file's actual name. This installs the DEB package and all related dependencies.
    • If you want to make Gdebi the default install tool for DEB packages in Ubuntu or any Ubuntu-related distribution, it's easy:
      • Right-click a .DEB file and choose Properties.
      • Click the "Open with" drop-down menu and choose Gdebi Package Installer.
    • If you want to uninstall a package you installed with Gdebi, use the apt command. The syntax is sudo apt remove packagename.
  5. Advertisement
Method 3
Method 3 of 4:

Using Apt

  1. 1
    Open a terminal window. If you're logged into a shell account, just skip to the next step. Otherwise, you can press Ctrl + Alt + T to open a terminal window in most window managers.
    • Apt is normally used to download and install software from remote sources, but you can use it to install local DEB packages using a special syntax.
    • Unlike when using Gdebi to install DEB files locally, Apt will not automatically resolve dependencies. However, Apt does resolve dependencies automatically if you use it to install software from remote repositories.
  2. 2
    Use cd to navigate to the directory with the DEB file. For example, if you saved the file to /home/username/Downloads, type cd /home/username/Downloads and press Enter or Return.
  3. 3
    Run the installation command. Type sudo apt install ./filename.deb and press Enter or Return. The software will now install.
    • Be sure to replace filename.deb with the actual name of the file, take note of the ./ before it—if you leave it out, the apt tool will try searching for the package in remote repositories.
    • If it's the first time you've run a command using sudo in this window, you'll have to enter your password when prompted to continue.
    • To see a list of all installed packages with Apt, use the command sudo apt list --installed.
    • To remove a package with Apt, use the command sudo apt remove packagename.
  4. Advertisement
Method 4
Method 4 of 4:

Using Dpkg

  1. 1
    Open a terminal window. If you're logged into a shell account, just skip to the next step. Otherwise, you can press Ctrl + Alt + T to open a terminal window in most window managers.
    • Dpkg comes preinstalled on all Debian-based Linux systems, including Ubuntu and Linux Mint.
    • If you have trouble with dependencies using Dpkg, give Gdebi a try instead.
  2. 2
    Use cd to navigate to the directory with the DEB file. For example, if you saved the file to /home/username/Downloads, type cd /home/username/Downloads and press Enter.
  3. 3
    Type sudo dpkg -i filename.deb and press Enter. Replace filename.deb with the name of the DEB file. This command will install the package.
    • Make sure you enter the -i using a lowercase i, as Dpkg commands are case-sensitive.
    • If it's the first time you've run a command using sudo in this window, you'll have to enter your password when prompted to continue.
  4. 4
    Resolve any dependency errors (optional). If the previous command threw an error about dependencies, run sudo apt-get install -f to resolve them.
    • To see a list of all installed packages with Dpkg, use the command sudo dpkg-query -l .
    • You can easily remove packages with Dpkg using dpkg -r packagename.[3]
  5. Advertisement

About This Article

Nicole Levine, MFA
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Nicole Levine, MFA. Nicole Levine is a Technology Writer and Editor for wikiHow. She has more than 20 years of experience creating technical documentation and leading support teams at major web hosting and software companies. Nicole also holds an MFA in Creative Writing from Portland State University and teaches composition, fiction-writing, and zine-making at various institutions. This article has been viewed 152,142 times.
How helpful is this?
Co-authors: 4
Updated: February 11, 2023
Views: 152,142
Article SummaryX

1. Open a terminal window.
2. Change to the directory with the DEB file.
3. Type "sudo dpkg –i filename.deb" and press Enter.
4. Enter your password.
5. Run "sudo apt-get install -f" to resolve errors.

Did this summary help you?
Advertisement