Rank #1 on Google Maps
India English
Kenya English
United Kingdom English
South Africa English
Nigeria English
United States English
United States Español
Indonesia English
Bangladesh English
Egypt العربية
Tanzania English
Ethiopia English
Uganda English
Congo - Kinshasa English
Ghana English
Côte d’Ivoire English
Zambia English
Cameroon English
Rwanda English
Germany Deutsch
France Français
Spain Català
Spain Español
Italy Italiano
Russia Русский
Japan English
Brazil Português
Brazil Português
Mexico Español
Philippines English
Pakistan English
Turkey Türkçe
Vietnam English
Thailand English
South Korea English
Australia English
China 中文
Somalia English
Canada English
Canada Français
Netherlands Nederlands

How to Install a .deb File in Ubuntu: 5 Quick Steps

Buy domains, business emails, hosting, VPS and more: Get Started

Cheapest Domains in Kenya

Get your .Co.ke domain now for just KSh 999 (Back to 1200 in 7 days)

.CO.KE for KSh 999 | .COM for KSh 999

A .deb file is simply a package format for Ubuntu and other Debian-based Linux systems. 

It is like an installer file, similar to an .exe file on Windows.

When a software vendor wants to give you their application directly, they usually package it as a .deb file.

So why would you need to install one? 

The default Ubuntu software store does not have every application. Some programs are missing entirely. 

Other times, the version in the store is old, and you want the latest release straight from the developer. Installing a .deb file solves both problems. 

You get the exact application you need right away, without waiting for Ubuntu to add it.

5 Quick Steps  to Install a deb File in Ubuntu (Apt)

how to install a deb file in ubuntu - ubuntu

1) Download the .deb File

First, get the .deb file from the software developer’s website. Save it somewhere you can easily find.

Make sure you pick the correct version for your system, usually one labelled for Ubuntu or Debian.

2) Go to the Folder Where the .deb File Is Saved

Open the Terminal. Use the cd command to navigate to the folder containing the file. For example, if it’s in your Downloads folder, type:

cd ~/Downloads

You can check if the file is there by typing ls and looking for the filename ending in .deb.

3) Install the .deb File Using apt

The apt command automatically handles most dependencies. Run this command:

sudo apt install ./filename.deb

Replace filename.deb with the actual name of your file. The ./ tells apt to look in the current folder.

Using apt instead of a lower-level tool is preferred because it automatically fetches and installs any required libraries from Ubuntu’s repositories.

4) Fix Missing Dependencies

If you still see errors about missing dependencies after the install, run:

sudo apt install -f

The -f stands for “fix broken”. This command tells apt to look for any unmet dependency requirements and install any missing packages.

5) Open and Confirm the App Works

Once the installation finishes, close the Terminal. Go to your applications menu and search for the program you just installed.

Click on it to launch. Confirm it opens without errors. If it runs fine, you are done.

Alternative Method: Install A .deb File Using dpkg

When To Use dpkg

dpkg is the low-level package manager that sits underneath apt

You would use this directly when you are offline or when apt refuses to install a local file for some reason. 

It gives you more control, but it does not automatically download missing dependencies.

dpkg Install Command

To install a .deb file with dpkg, navigate to the folder containing the file and run:

sudo dpkg -i filename.deb

The -i flag stands for install.

How To Fix dpkg Dependency Errors

If dpkg gives you a dependency error, do not panic. The package is installed but broken. Fix it by running:

sudo apt install -f

This command will pull in all the missing dependencies that dpkg could not get. After that, your application should work normally.

Alternative Method: Install A .deb File By Double-Clicking (GUI)

If you prefer not to use the Terminal, locate the .deb file in your file manager and double-click it. 

Ubuntu will automatically open the file with the “Software Install” application.

Then click the “Install” button, enter your password, and the installation proceeds.

This method works best for beginners or for simple applications with few complex dependencies. 

If you are installing a single small tool, such as Discord, Zoom, or Google Chrome, double-clicking is perfectly fine. 

Just be aware that the Software Install window can sometimes get stuck or close without explanation.

This usually happens when a dependency issue prevents the GUI from resolving. 

Another problem is when the “Install” button stays greyed out.

In both cases, your best fix is to switch to the Terminal method using apt, which gives you error messages you can actually read and act upon.

How To Uninstall A .deb Package

Find The Package Name:

Before you can remove software, you need its exact package name. To find it, run:

dpkg -l | grep -i partofname

Replace partofname with a keyword from the application. For example, if you installed Google Chrome, use grep -i chrome. The command lists all installed packages and filters for your keyword.

Remove The Package With apt:

Once you have the exact package name, uninstall it with:

sudo apt remove packagename

Replace packagename with the name you found. This command removes the application but keeps its configuration files.

If you want to remove everything, including configuration files, use sudo apt purge packagename.

Remove Unused Dependencies:

After removing an application, libraries may remain that are no longer needed. Clean them up with:

sudo apt autoremove

This command removes any packages that were automatically installed as dependencies but are no longer required by anything on your system.

Common Errors When Installing .deb Files

  • Unsupported Architecture Error: You downloaded a package for a different processor type. Solution: Download the amd64 version for modern computers or the arm64 version for Raspberry Pi-style devices.
  • Dependency Problems: Missing libraries or packages. Solution: Run sudo apt install -f. If that does not work, run sudo apt update first, then try the install command again.
  • Permission Denied Error: You forgot to use sudo before your install command. Solution: Put sudo at the start of the command and enter your password.
  • File Not Found Error: The Terminal is looking in the wrong folder or the filename is spelled incorrectly. Solution: Use ls to list files and check the spelling. Remember, Linux filenames are case-sensitive.
  • Package Conflicts: A different version or conflicting package is already installed. Solution: Remove the conflicting package first with sudo apt remove conflicting-package, then install the new .deb file.

Safety Tips Before Installing .deb Files

  • Avoid unknown download sites. Only download from official vendor websites or trusted repositories like GitHub releases of well-known projects.
  • Prefer official vendor websites. Get Discord from discord.com, Google Chrome from google.com/chrome, and Visual Studio Code from code.visualstudio.com.
  • Keep your system updated. Run sudo apt update && sudo apt upgrade -y before installing any new .deb package.

Quick Command Summary

ActionCommand
Install .deb with apt (recommended)sudo apt install ./filename.deb
Install .deb with dpkgsudo dpkg -i filename.deb
Fix dependency errorssudo apt install -f
Remove a packagesudo apt remove packagename
Remove unused dependenciessudo apt autoremove
Find installed package name dpkg -l | grep -i keyword

How to Install a Deb file in Ubuntu FAQs

They are as safe as the source from which you get them. A .deb file from the official developer is safe. The same file from a random forum post could be dangerous. Always verify the source.

Yes. Use the sudo apt remove command followed by the package name. You can also use sudo dpkg -r packagename if you prefer.

The methods in this article work exactly the same on Ubuntu 24.04 and newer. Use sudo apt install ./filename.deb for the best result.

It is an archive that contains the actual program files, installation instructions, and a list of dependencies.

When you install it, the package manager extracts the files to the correct system locations and registers the software, so Ubuntu knows it exists.

Ready to install a .deb file in Ubuntu on Truehost VPS?

You have the commands. You have the safety tips. Now you need a reliable environment to run your software.

If you are hosting applications on a remote server, you want installation processes that work the first time. 

how to install a deb file in ubuntu - Truehost

That means having a clean, up-to-date Ubuntu system with full control. Our VPS hosting plans give you exactly that.

We offer blazing-fast SSD storage, full root access, and you can choose between our local Nairobi data centres or worldwide locations.

We have you covered with KVM virtualization and a free dedicated IP address.

So, get a VPS that lets you run exactly the software you need. Check out our VPS prices and see how affordable a Kenya-based server can be. 

Cheapest Domains in Kenya

Get your .Co.ke domain now for just KSh 999 (Back to 1200 in 7 days)

.CO.KE for KSh 999 | .COM for KSh 999

Carolyne Ndumia
Author

Carolyne Ndumia

SEO Content Writer Kenya

Carolyne Ndumia has always believed that the best content feels like a conversation. For the past four years, she has built a career around that idea as an SEO Content Writer and Marketer, helping blogs and brands communicate with warmth, clarity, and purpose. Her approach blends creative storytelling with practical strategy. Writing a blog post, editing a newsletter, or optimizing a web page for SEO, Carolyne's goal remains the same: to create content that connects with people and makes sense for search engines. She relies on trusted tools like SEMrush for keyword research and draws on years of editorial experience to craft copy that resonates. Carolyne is here to support your team with structured, creative content operations so you can relax knowing the details are taken care of.

View All Posts