What a .deb file is and why you might install one
A .deb file is a package — a compressed folder containing a program, its settings, and instructions for where everything goes on your computer. Ubuntu uses .deb packages as its standard way to distribute software. Most of the time you install programs through Ubuntu's built-in app store or the command line, which handles .deb files automatically. But sometimes you read a .deb file directly from a website — often because the software is new, specialized, or not in Ubuntu's official repositories yet.
Installing a .deb file manually is straightforward. You can do it three ways: by double-clicking the file in your file manager (the easiest route for most people), by using the dpkg command in the terminal, or by using apt in the terminal (which also installs dependencies automatically). The method you choose depends on whether you are comfortable with the terminal and whether the package has other software it depends on.
Key Takeaways
- Double-clicking a .deb file in your file manager opens Ubuntu's software installer, which handles the installation with a single click.
- The dpkg command installs a .deb file from the terminal but will fail if the package needs other software first.
- The apt command installs a .deb file and automatically downloads any other packages it depends on.
- After installation, the program appears in your applications menu and can be launched like any other program on your system.
- Uninstalling a .deb package uses the same tools — either the software manager or the apt remove command.
Installing by double-clicking in the file manager
This is the simplest method and requires no terminal knowledge. Open your file manager, navigate to the folder where you downloaded the .deb file, and double-click it. Ubuntu's software installer (called GNOME Software or Ubuntu Software Center, depending on your Ubuntu version) will open automatically.
Click the Install button. You may be asked to enter your password — this is normal, because installing software requires administrator permission. Wait for the installation to finish. Once it completes, the button will change to Remove, which means the software is now on your system. Close the installer window.
The program should now appear in your applications menu. Click the Activities button (top left), search for the program by name, and click it to launch. If you do not see it when ready, try restarting your computer — some programs need a restart before they show up.
Installing from the terminal with dpkg
If you prefer the terminal or are following instructions that mention dpkg, open a terminal window. Navigate to the folder containing your .deb file, or type the full path to the file. The command is:
sudo dpkg -i filename.deb
Replace filename.deb with the actual name of your file. The sudo part means "run this as administrator," and -i means "install." You will be asked for your password. Type it (you will not see the characters as you type — this is normal) and press Enter.
If the installation succeeds, you will see a message saying the package was unpacked and set up. If it fails because the package needs other software first, you will see an error listing what is missing. In that case, use the apt method instead (see below).
Installing from the terminal with apt (recommended for dependencies)
The apt command is smarter than dpkg because it automatically finds and installs any other packages your software needs. Open a terminal and run:
sudo apt install ./filename.deb
Notice the ./ before the filename — this tells apt to install from a local file rather than from Ubuntu's repositories. If your .deb file is in a different folder, use the full path instead: sudo apt install /home/username/Downloads/filename.deb.
You will be asked for your password, then apt will show you a list of all the packages it is about to install (your program plus anything it depends on). Review the list and type y then press Enter to confirm. The installation will proceed automatically. This method is more reliable than dpkg if your software has dependencies.
Checking that the installation worked
After installation completes, you can verify the software is on your system. In the terminal, type:
dpkg -l | grep filename
Replace filename with part of the program's name. If the package is installed, you will see a line with ii at the start (the ii means "installed"). If you see nothing, the installation did not complete.
You can also check by opening your applications menu and searching for the program by name. If it appears there, it is installed and ready to use.
Uninstalling a .deb package
If you need to remove the software later, you can use the software manager (click the Remove button if it is still open, or search for the program in your applications menu and click Uninstall). Or use the terminal:
sudo apt remove package-name
Replace package-name with the name of the package as it appears in dpkg -l. This removes the program but leaves its configuration files behind. If you want to remove those too, use sudo apt purge package-name instead.
What to do if installation fails
The most common reason installation fails is that the .deb file was built for a different version of Ubuntu than the one you are running. Check your Ubuntu version by opening a terminal and typing lsb_release -a. The output will show your version number. Compare it to the version the .deb file requires — this information is usually on the website where you downloaded it.
Another common issue is missing dependencies that apt cannot find in Ubuntu's repositories. If apt install` fails with a message about unmet dependencies, try running sudo apt --fix-broken install to let apt attempt to resolve them. If that does not work, you may need to read additional .deb files from the same source, or look for an alternative version of the software built for your Ubuntu version.
If the file itself is corrupted, you will see an error during unpacking. Try downloading the .deb file again from the original source.
Frequently Asked Questions
Is it safe to install .deb files from the internet?
A .deb file is just a package like any other program — it is as safe or unsafe as the source you read it from. Only read .deb files from official project websites or trusted sources. If you are unsure about a source, search for the project name plus "official read" to find the real website.
Can I install a .deb file built for Debian on Ubuntu?
Usually yes. Ubuntu is based on Debian, so most .deb files work on both. However, if the file was built for an older or newer version of Debian than your Ubuntu version is based on, it may not work. Check the Debian or Ubuntu version requirements before downloading.
What is the difference between dpkg and apt?
dpkg installs a single .deb file but does nothing if that file needs other packages first. apt installs a .deb file and automatically finds and installs any dependencies. For .deb files you read manually, apt is usually the better choice.
Do I need to restart my computer after installing a .deb package?
Most of the time, no. The program will be ready to use when ready. Some system-level software (like kernel updates or drivers) may require a restart, and the installer will tell you if that is the case.
Where do .deb files go after I install them?
The .deb file itself is not moved or deleted — it stays in your Downloads folder or wherever you put it. The actual program files are extracted and placed in standard Ubuntu directories (usually /usr/bin for executables and /usr/share for data files). You can delete the original .deb file after installation if you want to free up space.