📝 Introduction

A .deb file is a software package for Debian-based systems like Ubuntu, Linux Mint, and Debian. This guide shows two safe ways to install a .deb file:

  • apt – resolves dependencies automatically (recommended for beginners).
  • dpkg -i – installs the file directly; you may need an extra step to fix dependencies.
MethodProsCons
apt install ./file.debAutomatically installs missing dependencies; integrates with APT history.Requires apt (available by default on Ubuntu/Debian).
dpkg -i file.debVery direct and fast.May fail with missing dependencies; requires extra apt -f install.

📦 What is a .deb file?

A .deb file bundles an application and metadata so your system can install it. You typically download it from a project’s official website or a trusted repository.

Note: Only install .deb files from sources you trust.

✅ Method 1: Install with apt (recommended)

Step 1 — Go to the folder with your .deb file

What it does: Changes the terminal’s current directory to where your file is located (e.g., Downloads).

cd ~/Downloads

Step 2 — Install the package with apt

What it does: Installs the .deb and automatically fetches any required dependencies.

sudo apt install ./your-package.deb

Step 3 — Confirm installation

What it does: Checks if the package is installed and shows details.

apt policy your-package-name
Tip: Using ./ tells apt you are installing from a local file.

🧰 Method 2: Install with dpkg -i

Step 1 — Go to the folder with your .deb file

cd ~/Downloads

Step 2 — Install with dpkg

What it does: Installs the package directly. It does not download missing dependencies.

sudo dpkg -i your-package.deb

Step 3 — Fix missing dependencies (if any)

What it does: Resolves and installs any dependencies that dpkg reported as missing.

sudo apt -f install
Note: If the install fails, always run the dependency fix step above.

🔎 Verify installation & 🗑 Remove a package

Check if the package is installed

What it does: Shows installed version and where it came from.

apt policy your-package-name

List related files (optional)

What it does: Displays files installed by the package.

dpkg -L your-package-name

Remove (uninstall) the package

What it does: Removes the package but keeps user config files.

sudo apt remove your-package-name

Remove completely (including config files)

What it does: Purges the package and its system config files.

sudo apt purge your-package-name

Clean up unused dependencies (optional)

What it does: Removes packages that were installed automatically and are no longer needed.

sudo apt autoremove

🛠 Troubleshooting

“dependency problems prevent configuration”
→ Run the fix command to install missing dependencies:

sudo apt -f install

“package architecture (amd64) does not match system”
→ You downloaded the wrong build (e.g., ARM vs x86). Download the correct .deb for your CPU.

“file not found” when running apt/dpkg
→ You’re not in the right folder. Change to where the .deb is located or use the full path:

sudo apt install /path/to/your-package.deb

“held packages” or partial installs
→ Update package lists and try again:

sudo apt update && sudo apt -f install

GUI didn’t show the app after install
→ Log out/in or run the app by its command name (check with dpkg -L to find binaries in /usr/bin).


🔐 Security Tips

  • Download from official sources (project website or trusted repos).
  • Verify checksums when provided (detects corrupted or tampered files):
sha256sum your-package.deb
  • Prefer repositories or official PPAs for automatic updates over one-off .deb installs.

📚 Resources & Further Reading