Learning Center
Ubuntu

How to Install .DEB Files on Ubuntu

21 Feb 2025
Awais Khan
Awais Khan

Ubuntu is a standout Linux distribution, appreciated by a vast number of people around the world. Among the various software package formats it supports, .DEB formats are particularly common in Debian-based systems like Ubuntu. Installing such packages on Ubuntu is a simple task that brings a wealth of applications within reach. Mastering the installation of these packages is crucial for effective application management on Ubuntu.

This article details multiple strategies: apt, dpkg, GDebi, alien, and GUI. Follow these approaches for the installation and management of .DEB files on Ubuntu.

Overview of .DEB Packages
Copy link

Let's define what .DEB packages are before we move on to the installation procedures. Within a .DEB package, you'll find everything required to install software, including compiled code, metadata, and scripts. These packages streamline software distribution and installation on Debian-based systems such as Ubuntu.

Adopting .DEB packages comes with several benefits:

  • Ease of Installation: It simplifies installation by including all essential files and dependencies.
  • Consistency: It guarantees consistent software installation across various systems.
  • Security: The verified packages from trusted sources often include security updates, keeping your system secure.

And if you’re looking for a reliable, high-performance, and budget-friendly solution for your workflows, Hostman has you covered with US based VPS and Linux VPS Hosting options, including Debian VPS, Ubuntu VPS, and VPS CentOS.

Prerequisites
Copy link

Confirm you have:

  • An Ubuntu-running machine
  • Elevated (sudo) permissions for terminal access
  • A Debian File

Method 1: Via apt 
Copy link

apt is a reliable and versatile terminal utility for handling package management on Ubuntu. The tool's independent dependency management makes it an excellent way for installing Debian files. Here's the way to utilize it:

  1. Access Terminal: Use Ctrl + Alt + T to launch the terminal.

  2. Access the Directory: Run the cd command to head to the directory holding your Debian package. For instance:

cd ~/Downloads
  1. Install the package: Leverage the apt utility for installing the package, ensuring filename.deb is correctly named:

sudo apt install ./filename.deb

Method 2: Via dpkg
Copy link

dpkg is a crucial utility for installing packages on Ubuntu. While it provides more control during installation, you'll need to manage dependencies manually. Experienced users seeking more control over the process will find this method advantageous. Here's how:

  1. Begin by opening the terminal.

  2. Access the folder containing the .DEB package you want to install:

cd ~/Downloads
  1. Apply the dpkg tool for installation, changing filename.deb to your exact file name:

sudo dpkg -i filename.deb

Image4

  1. Fix dependencies. If dependencies are missing, rectify this with:

sudo apt install -f

Image3

Method 3: Via GDebi Installer
Copy link

GDebi offers a simple interface specifically aimed at handling .DEB installations while efficiently managing dependencies. Providing both terminal and graphical interfaces, it guarantees that the installation process is clear and accessible. Here's how to utilize it:

  1. Install GDebi: Initially, make sure GDebi is installed if it hasn’t been set up on your system yet:

sudo apt install gdebi
  1. Open .DEB File: Reach the directory holding the .DEB file and open it with GDebi:

cd ~/Downloads
sudo gdebi filename.deb

Image5

Another option is to leverage the GDebi GUI:

  1. Right-click the .DEB package, then choose Open With Other Application.

  1. Go with GDebi Package Installer.

Image8

  1. Give GDebi a moment to analyze the file and show the installation details. Click Install Package.

Image7

Method 4: Via alien
Copy link

Though typically employed for format conversion, the alien tool can directly install the .DEB file.

  1. If alien is not already installed, install it by applying:

sudo apt install alien
  1. Use the cd command to reach the directory holding the .DEB file:

cd ~/Downloads
  1. Utilize alien for installing .DEB:

sudo alien -i filename.deb

Image9

Let alien handle the rest, converting the .DEB file if required.

Way 5: Via GUI
Copy link

If you avoid the terminal, the Software Center offers a GUI alternative.

  1. Access the system’s file manager and move to the folder containing your Debian file. Using the file manager makes it simple to browse through your file system and locate the file you need.

Image10

  1. Right-click the package, pick Open with Other Application, then go for Open with Software Install. Once opened, the Software Center will display an easy-to-use interface to install the chosen package.

Image12

  1. Hit the Install button to start the installation. Let the center manage the rest, including handling and installing any necessary dependencies.

Image13

Troubleshooting
Copy link

If you encounter problems, here are some common fixes:

Dependency Errors

Solution: Fix any such issues by running:

sudo apt install -f

Package Not Found

Solution: Verify that you're in the correct directory and the file name is accurate. Ensuring you have the correct file name and directory path is crucial for a successful installation.

Permission Denied

Solution: Make sure you are utilizing sudo for commands that require elevated privileges. Executing commands with sudo grants the required permissions to carry out administrative tasks.

Corrupted Debian Package

  • Solution: Validate the file's integrity by checking its checksum:
sha256sum filename.deb

Image14

Insufficient Disk Space

  • Solution: Check available disk space and free up space if necessary.
df -h

Unclear Error Messages

  • Solution: Inspect relevant logs for detailed error information:
tail -f /var/log/dpkg.log

Best Practices for .DEB Packages Management
Copy link

Below are several essential practices to ensure the secure and seamless handling of .DEB:

  • Regular Updates: Keep your system and utilities up to date to avoid compatibility problems.
  • Utilize Trusted Sources: Only download .DEB packages from reputable sources to avoid malware and maintain software integrity.
  • Backup Important Data: Before setting up a new app, especially from Debian types, backup your important data to prevent data loss in case of issues.
  • Remove Unused Packages: Periodically clean up unused packages to maintain system performance.

FAQ
Copy link

How to resolve installation issues related to missing dependencies?

In case of missing dependencies, apply:

sudo apt install -f

How to uninstall a .DEB package on Ubuntu?

Employ the below command to uninstall the .DEB package:

sudo apt remove <package-name> -y

Update <package-name> with the appropriate package name you want to remove.

Conclusion
Copy link

With these techniques, installing .DEB packages on Ubuntu becomes effortless. No matter if you utilize apt, dpkg, GDebi, alien, or GUI, you can go with the method that aligns with your preferences. Each has its own advantages, so consider your comfort level and the specific requirements of the Debian file you are installing.

Stick to these instructions, and installing packages on Ubuntu will be smooth and seamless. The key is to choose the one that suits you best and to troubleshoot any concern through the provided fixes. 

You can also use our S3 compatible storage to save all the .DEB files you need for your server.