How to Install deb File in Ubuntu: A Complete Guide

deb File in Ubuntu

Table of Contents

Get up to 50% off now

Become a partner with CyberPanel and gain access to an incredible offer of up to 50% off on CyberPanel add-ons. Plus, as a partner, you’ll also benefit from comprehensive marketing support and a whole lot more. Join us on this journey today!

In Ubuntu and other Debian-based Linux distributions, software is often distributed in the form of .deb packages. These packages contain all the important files and metadata needed to install an application, making installation streamlined and efficient. 

While most of the users mainly rely on the official Ubuntu repositories or the Ubuntu Software Center to install the applications. But sometimes you may need to install software that is only available as a .deb file. 

In this guide, we shall walk through the different methods to install deb file in Ubuntu and troubleshoot common issues. 

What is a .deb File in Ubuntu?

A .deb file is a Debian software package used to distribute and install applications on Debian-based Linux distributions. It contains the application’s files, libraries, and metadata needed for installation, such as version information and dependencies. 

It is like a pre-built bundle for a specific program. Instead of manually copying the files to the system, you just use this package. 

Key points about .deb files:

Tech Delivered to Your Inbox!

Get exclusive access to all things tech-savvy, and be the first to receive 

the latest updates directly in your inbox.

  • Typically have the extension .deb.
  • They are installed using the command-line tools like dpkg or apt, or via the Ubuntu Software Center.
  • They include metadata for proper versioning and dependency management. I
  • Make it easier to distribute software outside of standard repositories.

Using .deb files is common when installing third-party applications, beta software, or packages not available in the official Ubuntu repositories.

How to Install deb File in Ubuntu – Top 4 Methods

There are several methods to install deb file in Ubuntu, depending on what you prefer. Here is how you can do so with command line or a GUI tool. 

  1. Using dpkg Command

The dpkg command is the most used tool for installing .deb files in Ubuntu, 

sudo dpkg -i package-name.deb

  • -i stands for install.
  • If there are missing dependencies, run:

sudo apt-get install -f

This fixes and installs any required packages.

  1. Using apt Command

Using the apt command automatically resolves the dependencies, making it a safe choice. 

sudo apt install ./package-name.deb

  • The ./ tells apt that the package is a local file.

This method is the safest bet since it ensures that all the dependencies are installed automatically. 

  1. Using gdebi Tool

gdebi is a lightweight command-line and GUI tool to install deb file in Ubuntu along with their dependencies. It is especially useful when you are handling complex dependencies. 

Enhance Your CyerPanel Experience Today!
Discover a world of enhanced features and show your support for our ongoing development with CyberPanel add-ons. Elevate your experience today!

  • First, install gdebi:

sudo apt install gdebi

  • Then install the .deb file:

sudo gdebi package-name.deb

  1. Using Ubuntu Software Center (GUI Method)

If you like working with graphical user interface more, then this method is for you: 

  • Locate the .deb file in the file manager. 
  • Right-click on the file and select “Open With Software Install”.
  • Click install and authenticate with your password. 

This is quite literally the easiest method for beginners who are not comfortable with the terminal. 

Related Article: Debian based Linux Servers: Your Go-To Guide

How to Fix Dependency Issues When Installing .deb Files

Sometimes, the .deb files installation fails due to unmet dependencies. Here are a few methods to fix this issue: 

  • Using apt to fix broken installs will automatically install the missing dependencies. Run this command:  sudo apt –fix-broken install
  • Combining dpkg with apt will allow you to see any dependencies errors and fix them on the spot. Run this command to install any missing packages.
    sudo dpkg -i package-name.deb

sudo apt-get install -f

  • Update package lists before retrying using: sudo apt update

Uninstalling a .deb Package in Ubuntu

If you no longer need the software, you can uninstall it by the following methods: 

  • Using apt
    sudo apt remove package-name
  • Using dpkg
    sudo dpkg -r package-name
  • To remove configuration files too
    sudo apt purge package-name

Lastly, clean up unused dependencies by running: 

sudo apt autoremove

Best Practices to Install deb File in Ubuntu

A few best practices to keep in mind while installing a .deb file in Ubuntu are: 

  • It goes without saying that you should only download the files from a trusted source, like official websites or verified repositories. 
  • Check the architecture compatibility before downloading. For example amd64 for 64-bit, i386 for 32-bit is a safe bet. 
  • Verify the package integrity using sha256sum or md5sum whenever possible.
  • Go with automatic repositories instead of the manual work to cut down on the configurations. 
  • Keep the system up to date to avoid any dependency conflicts. 

Common Errors and Troubleshooting

Error MessageCauseSolution
dependency problems prevent configurationMissing librariesRun sudo apt-get install -f
dpkg: error processing packageIncomplete or broken installRun sudo dpkg –configure -a
package architecture does not match systemWrong .deb file (32-bit vs 64-bit)Download correct version
command not found: gdebiTool not installedInstall it with sudo apt install gdebi
Installation succeeds but app won’t runVersion conflict or missing dependencyCheck logs with journalctl -xe

Conclusion

It is super easy to install deb file in Ubuntu if you are familiar with either the command line or GUI tools. Whether you prefer using dpkg, apt, gdebi, or the Ubuntu Software Center, each method gives the right results!

FAQs

How do I install deb file in Ubuntu?

You can install a .deb file using:
Terminal: sudo dpkg -i package.deb followed by sudo apt -f install
APT command: sudo apt install ./package.deb
GUI: By double-clicking the file and using Ubuntu Software Center.

Is it safe to install .deb files from the internet?

Only install .deb files from trusted sources (official websites, verified repositories). Malicious .deb packages can harm your system.

What’s the difference between .deb and .tar.gz files in Linux?

.deb → Precompiled software package, ready to install.
.tar.gz → Compressed archive that may contain source code requiring compilation.

Marium Fahim
Hi! I am Marium, and I am a full-time content marketer fueled by an iced coffee. I mainly write about tech, and I absolutely love doing opinion-based pieces. Hit me up at [email protected].
Unlock Benefits

Become a Community Member

SIMPLIFY SETUP, MAXIMIZE EFFICIENCY!
Setting up CyberPanel is a breeze. We’ll handle the installation so you can concentrate on your website. Start now for a secure, stable, and blazing-fast performance!