MeshWorld India Logo MeshWorld.
ubuntu apt dpkg packages linux 8 min read

Install .deb Packages on Ubuntu 26.04

Jena
By Jena
| Updated: Apr 26, 2026
Install .deb Packages on Ubuntu 26.04

While APT handles most software installation from repositories, sometimes you need to install a .deb package directly—proprietary apps from vendor websites, locally built packages, or software not in default repos. This guide covers every method to install .deb packages on Ubuntu 26.04, including dependency resolution and troubleshooting.

[!TIP] Real-World Scenario: You’re trying to install that one specific version of VS Code or Chrome that isn’t in the repos, and you download a .deb file. You double-click it, and… nothing happens. This is where knowing the CLI commands saves you from a frustrating ‘Linux moment’.

TL;DR
  • sudo apt install ./package.deb — preferred method with automatic dependencies
  • sudo dpkg -i package.deb — low-level installation without dependency resolution
  • sudo apt --fix-broken install — resolve missing dependencies after dpkg
  • sudo apt install gdebi-core — install GDebi for GUI or CLI with dependency handling

Prerequisites

Before you start, you need:

  • Ubuntu 26.04 with sudo access
  • Familiarity with basic APT package management
  • A .deb file to install (download from vendor or build locally)

What is a .deb package?

A .deb file is the Debian package format used by Ubuntu and Debian-based distributions. It’s an archive containing:

  • Compiled application binaries
  • Configuration files
  • Documentation
  • Metadata (dependencies, version, maintainer info)

When you need to install a .deb manually:

  • Software vendor distributes as .deb (Chrome, VS Code, Zoom)
  • You’ve built a package locally from source
  • Need a specific version not in current repositories
  • Installing on a system without internet access

How do I install .deb packages with apt?

The apt install command is the preferred method because it automatically resolves and installs missing dependencies.

Install a .deb File

Navigate to the directory containing the .deb file:

bash
cd ~/Downloads
sudo apt install ./package.deb

The leading ./ is essential. Without it, APT searches repositories for a package name instead of using the local file.

Verify the Installation

bash
apt show package-name
dpkg -l | grep package-name

APT displays a summary and installs additional dependencies from repositories. Review the list and confirm with Y when prompted.

Information

Permission notice: You may see a message about “Download is performed unsandboxed as root.” This is harmless—APT falls back to root when the _apt user can’t read files in your home directory. The package installs correctly. To avoid this, move the .deb to /tmp before installing.

Warning

Always prefer apt install ./package.deb over dpkg -i when you have an internet connection. APT handles the entire dependency chain in one step.

How do I install .deb packages with dpkg?

The dpkg command is the low-level package manager underlying APT. It installs .deb files directly but doesn’t resolve dependencies automatically.

Basic dpkg Installation

bash
sudo dpkg -i package.deb

If all dependencies are satisfied, the installation completes successfully.

Resolve Missing Dependencies

If dpkg reports unmet dependencies:

bash
sudo apt --fix-broken install

This reads the dependency information left by dpkg, downloads required packages, and completes the installation.

Verify Installation

bash
dpkg -l | grep package-name

A status of ii confirms the package is fully installed.

Install Multiple .deb Files

Install several packages at once:

bash
sudo dpkg -i package1.deb package2.deb package3.deb

Or install all .deb files in a directory:

bash
sudo dpkg -i /path/to/debs/*.deb

Follow with sudo apt --fix-broken install to resolve any dependency issues.

How do I install .deb packages with GDebi?

GDebi combines a simple interface with automatic dependency resolution. It’s useful for desktop users or as a dpkg alternative with built-in dependency handling.

Install GDebi

bash
# Command-line only
sudo apt install gdebi-core

# With graphical interface
sudo apt install gdebi

Install with GDebi CLI

bash
sudo gdebi package.deb

GDebi displays the package description and lists required dependencies before asking for confirmation, then downloads and installs everything in one step.

Install with GDebi GUI

Right-click a .deb file in the file manager and select “Open With GDebi Package Installer.” The window shows package details, dependencies, and an “Install Package” button.

How do I manage installed .deb packages?

Once installed, .deb packages are managed like any repository package.

Check Package Information

bash
# Display detailed information
apt show package-name

# List all files installed by the package
dpkg -L package-name

# Check which package owns a specific file
dpkg -S /path/to/file

Remove a Package

Remove while keeping configuration files:

bash
sudo apt remove package-name

Remove including configuration files:

bash
sudo apt purge package-name

Clean up orphaned dependencies:

bash
sudo apt autoremove

How do I troubleshoot installation errors?

Dependency Errors

If dpkg -i fails with dependency errors:

bash
sudo apt --fix-broken install

If required dependencies aren’t in your repositories, add the appropriate repository or download dependency .deb files manually.

Architecture Mismatch

If installing a package for a different architecture:

bash
# Check your system architecture
dpkg --print-architecture

# Enable multiarch support (e.g., for i386 on amd64)
sudo dpkg --add-architecture i386
sudo apt update

Then retry the installation.

File Conflicts

If a package tries to overwrite a file owned by another package:

bash
# Find which package owns the file
dpkg -S /path/to/conflicting/file

Remove the conflicting package first, or if certain the overwrite is safe, force it:

bash
sudo dpkg -i --force-overwrite package.deb
Critical

Use --force-overwrite with extreme caution. Overwriting files from other packages can break your system. Always verify the conflict before forcing.

Permission Denied Errors

Ensure you’re using sudo with installation commands. Package installation requires root privileges.

Summary

  • Use sudo apt install ./package.deb as your default method for automatic dependency handling
  • Use sudo dpkg -i package.deb for low-level control or offline installations, then run sudo apt --fix-broken install
  • Use sudo gdebi package.deb for a convenient CLI alternative with dependency resolution
  • Verify installations with apt show, dpkg -L, and dpkg -S
  • Remove packages with sudo apt remove or sudo apt purge
  • Always verify the source of .deb files before installing—untrusted packages can compromise your system

FAQ

What is the difference between apt install ./package.deb and dpkg -i? The key difference is dependency handling. apt install ./package.deb automatically downloads and installs missing dependencies. dpkg -i only installs the specified package and fails if dependencies are missing, requiring you to manually run sudo apt --fix-broken install afterward.

Why does apt install require the ./ prefix for local .deb files? The ./ prefix tells APT you’re specifying a file path rather than a package name. Without it, APT searches repository indexes. The ./ signals a local file in the current directory.

Can I install a .deb package without an internet connection? Yes. Use dpkg -i package.deb for offline installation. If the package has dependencies not already installed, you’ll need to provide those dependency .deb files as well. Pre-download all dependencies on a connected system using apt download and transfer them to the offline machine.

Is it safe to install .deb packages from third-party websites? Only install .deb packages from trusted sources like official vendor download pages. Third-party .deb files aren’t reviewed by Ubuntu’s security team and could contain malware. When possible, verify package checksums or GPG signatures.

How do I check which .deb packages I’ve installed manually? There’s no built-in distinction, but packages from local .deb files that don’t match any repository appear with status “local” when you run apt list --installed. Check /var/log/apt/history.log for local installation records.