How to Install a Deb Package in Ubuntu: Methods, Options, and What to Know First

Installing a .deb package in Ubuntu is one of those tasks that looks intimidating the first time but quickly becomes second nature. Whether you're setting up a browser, a development tool, or a third-party app that isn't in the official repositories, understanding the full picture — not just the commands — helps you make smarter decisions and avoid common pitfalls.

What Is a Deb Package?

A .deb file is the standard package format used by Debian-based Linux distributions, including Ubuntu. Think of it as the Linux equivalent of a .exe installer on Windows or a .dmg on macOS — it bundles an application's files, metadata, and installation instructions into a single archive.

Unlike apps installed through the Ubuntu Software Center or apt (which automatically resolves dependencies from official repositories), a manually downloaded .deb file puts more responsibility on you. Dependency handling, source trust, and update management all work differently.

The Two Main Installation Methods

Method 1: Using dpkg (Command Line)

dpkg is the low-level package manager that Ubuntu uses under the hood. It's fast and direct, but it does not automatically resolve dependencies.

sudo dpkg -i package-name.deb 

If the installation fails due to missing dependencies, follow up with:

sudo apt-get install -f 

The -f flag tells apt to "fix broken" installs by fetching any missing dependencies from the repository. This two-step approach works reliably for most packages.

Method 2: Using apt (Recommended for Most Users)

Starting with Ubuntu 16.04, you can install a local .deb file directly through apt:

sudo apt install ./package-name.deb 

The ./ prefix is important — it tells apt this is a local file path, not a repository package name. This method automatically handles dependencies, pulling required libraries from your configured repositories. For most users, this is the cleaner choice.

Method 3: Using a GUI (No Terminal Required) 🖱️

If you'd rather avoid the terminal entirely, Ubuntu's graphical installer can open .deb files directly:

  1. Navigate to the downloaded file in Files (Nautilus).
  2. Double-click the .deb file.
  3. Click Install in the Software Center window that opens.

This works well for straightforward packages but gives you less visibility into what's happening and may not handle edge cases as gracefully.

Key Variables That Affect the Process

Not every .deb installation goes smoothly, and the reason usually comes down to one of these factors:

VariableWhy It Matters
Ubuntu versionPackages built for older Ubuntu releases may have dependency conflicts on newer ones
System architectureA package compiled for amd64 won't install on arm64 (common on ARM-based devices)
Existing dependenciesSome packages require specific library versions already installed on your system
Source of the packageOfficial vendor .deb files are generally safer than third-party redistributions
Repository configurationIf dependencies aren't in your repos, apt's auto-fix can't help

You can check a package's architecture and dependencies before installing by running:

dpkg-deb --info package-name.deb 

This prints the package's metadata — including required dependencies, the target architecture, and the version — without installing anything.

Verifying Before You Install 🔍

Because .deb files bypass the curated Ubuntu repository pipeline, source verification matters. A few practices worth knowing:

  • Download directly from the official vendor whenever possible (e.g., Google Chrome, VS Code, Slack all offer official .deb files).
  • Check the SHA256 checksum if the vendor provides one. Run sha256sum package-name.deb and compare it to the published value.
  • Be cautious with .deb files from forums, file-sharing sites, or unofficial mirrors — they carry a higher risk of tampering.

After Installation: Updates and Management

This is where manually installed .deb packages diverge most from repository-installed software. apt upgrade won't update a package installed from a local .deb file unless the package adds its own repository entry during installation (many vendor packages, like Chrome or VS Code, do exactly this).

For packages that don't self-register a repo:

  • Check the vendor's website manually for new versions.
  • Re-download and re-run the installation command — dpkg and apt will recognize the newer version and upgrade in place.

To see what's installed and its version:

dpkg -l | grep package-name 

To remove a package installed via .deb:

sudo apt remove package-name 

The Spectrum of Complexity

For most users installing a single mainstream application from a reputable source, the process is a handful of commands or a few clicks. The complexity scales quickly when:

  • The package has complex or outdated dependency chains
  • You're running Ubuntu on non-standard hardware (ARM boards, custom builds)
  • You need to maintain multiple versions of the same package
  • The package modifies system-level libraries that other software depends on

Developers and system administrators often reach for additional tools — like gdebi for better dependency resolution, or containerization tools to isolate installations — while casual users rarely need to go beyond apt install ./package.deb.

The method that makes sense depends less on the package itself and more on your environment, your comfort with the terminal, and how that software fits into the rest of your system. ⚙️