What a .deb file is and when you'll encounter one
A .deb file is a package that contains a program, library, or tool ready to install on Debian-based Linux systems — which includes Ubuntu, Linux Mint, and many others. When you download software for Linux, you'll often see it offered as a .deb file instead of an installer like you'd find on Windows or Mac.
You might download a .deb directly from a developer's website, find one in a forum, or receive it from a colleague. Unlike software from your system's official repository (which your package manager already knows about), a .deb you download yourself needs to be installed manually — though the process is straightforward once you know the steps.
Key Takeaways
- The simplest way to install a .deb file is to double-click it in your file manager, which opens your system's graphical package installer.
- From the command line, use sudo apt install ./filename.deb in the directory where the file is located.
- Always verify that a .deb file comes from a source you trust, since installing a package gives it access to your system.
- If installation fails, check that your system architecture (32-bit or 64-bit) matches the .deb file you downloaded.
Installing a .deb file through your file manager
The graphical method works on most desktop Linux systems. Open your file manager, navigate to the folder where you downloaded the .deb file, and double-click it. Your system will open a package installer window — on Ubuntu this is usually called GNOME Software or Ubuntu Software Center, depending on your version.
The installer will show you what the package contains and what permissions it needs. Click the Install button, enter your password when prompted, and wait for the installation to finish. Once it's done, the program will be available in your applications menu.
Installing a .deb file from the command line
If you prefer the terminal or the graphical method isn't working, open a terminal and navigate to the folder containing the .deb file. Then run this command:
sudo apt install ./filename.deb
Replace filename.deb with the actual name of the file. The sudo part asks for your password because installing software requires administrator permissions. The apt install command will download any other packages your program needs to run, then install everything together.
If you're in a different folder than where the .deb is located, you can also type the full path: sudo apt install /home/username/Downloads/filename.deb. After you press Enter and confirm your password, the installation will proceed automatically.
Checking that the .deb file matches your system
Before installing, verify that the .deb is built for your system's architecture. Most modern computers are 64-bit, but some older machines or specialized setups run 32-bit systems. To check which one you have, open a terminal and type:
uname -m
If the output is x86_64, your system is 64-bit. If it shows i686, you're running 32-bit. Look at the .deb filename — it usually includes the architecture, like program_1.0_amd64.deb (64-bit) or program_1.0_i386.deb (32-bit). Installing a 32-bit package on a 64-bit system or vice versa will fail.
What to do if installation fails
If the installer shows an error, the most common cause is a missing dependency — another package your program needs to run. When you use apt install from the command line, it usually handles this automatically. If the graphical installer fails, try the command-line method instead, which is more likely to resolve dependencies on its own.
Another reason for failure is that the .deb was built for a different version of Linux than the one you're running. Ubuntu 20.04 and Ubuntu 22.04, for example, sometimes have incompatible libraries. If you know the .deb is for a different version, check the developer's website to see if they offer a version for your system.
If you're unsure what went wrong, the error message in the installer usually points to the problem. Copy the error text and search for it online — you'll often find others who've hit the same issue and the solution they used.
Uninstalling a .deb package
If you need to remove a program you installed from a .deb, you can uninstall it the same way you would any other package. Open your system's software manager and search for the program name, then click Uninstall. Alternatively, from the terminal, type:
sudo apt remove program-name
Replace program-name with the actual package name. If you're not sure what the package is called, you can list all installed packages with apt list --installed and search through the output.
Verifying a .deb file before installation
When you download a .deb from the internet, it's worth checking that it hasn't been tampered with. Reputable developers often publish a checksum — a long string of characters that acts as a fingerprint for the file. Download the checksum file from the same place you got the .deb, then open a terminal in that folder and run:
sha256sum -c filename.sha256
If the checksum matches, the file is intact. If it doesn't match or the command fails, don't install the package — something may have gone wrong during download or the file may not be what you think it is. Download it again from the official source.
Frequently Asked Questions
Can I install a .deb file from a non-Ubuntu system like Fedora or Arch?
.deb files are specific to Debian-based systems. Fedora uses .rpm files, and Arch uses its own package format. If you're on a different Linux distribution, you'll need to find the package in your system's repository or download the source code and compile it yourself.
What's the difference between installing from a .deb and using apt to install from the repository?
Both use the same underlying system, but a .deb you download manually is a single file you control, while repository packages are managed by your distribution's maintainers. Repository packages receive security updates automatically; .deb files you install manually do not unless the developer provides updates through their own system.
Do I need to be online to install a .deb file?
Not for the .deb itself, but if the package has dependencies, your system will need to download them from the internet. If you're offline, the installation will fail at the dependency stage. You can download the dependencies separately on another computer and transfer them, but that's rarely necessary in practice.
Why does the installer ask for my password?
Installing software gives a program access to system files and settings. Your password confirms that you, the system owner, authorized the installation. This is a security measure — it prevents malicious scripts from silently installing packages without your knowledge.
Can I install a .deb file that's meant for an older version of Ubuntu?
Sometimes, but it depends on how different the versions are and what libraries the package needs. Ubuntu versions released within a few years of each other usually share compatible libraries. If it fails, the error message will usually tell you which library is missing, and you can search for how to install that library separately.