How to Install Deb Files/Packages on Ubuntu 24.04


Debian files or packages are associated with the Debian-driven distributions, i.e., Ubuntu. Debian files are handled/installed differently when compared with the other package types on Ubuntu. A debian package mainly comprises three parts, i.e., configuration file(s), executable(s), and a control file (metadata).

Recently, the Ubuntu 24.04 Noble Numbat release is announced. Let’s see how the debian packages/files are installed on it.

Outline:

Command Line Methods to Install Debian Files/Packages on Ubuntu 24.04

The dpkg and apt are the commands to install the debian packages. The dpkg command is suitable for local installations. However, it only reads the configurations, controls, and executables.

If any dependencies are required, dpkg fails to handle them automatically. Here, the apt comes in. The apt command handles all the associated files of the “.deb” package including the dependencies.

So, it is recommended to use the apt command. However, you can also use dpkg without any hindrance. Let’s practice both commands/methods:

dpkg Command

The dpkg command is the best pick when dealing with local installations. Its dependencies-related issue arises in a few installations (not all). However, we will address the way to fix that as well:

Syntax:

The following syntax of the dpkg command installs any debian file:

sudo dpkg -i <Path-of-the-Deb-Package>

Example:

Follow the two-step process to successfully install the “.deb” package file using the dpkg command:

Step 1: Install the “.Deb” Package

The deb package is available in the current directory, so the following command is used to install that package:

sudo dpkg -i <package>

Step 2 (Optional): Resolve the Dependencies Error

If any dependencies are required and the package installation has failed, you have to use the following apt command to resolve the dependencies error:

sudo apt install -f

The dependencies error arises in some of the packages. It is not necessary that every package has the dependencies error.

  • Dealing With the dpkg Configuration

Sometimes, the dpkg own’s configuration may halt the processing of the installation. To fix that, you have to configure/reconfigure the dpkg manager using the command:

sudo dpkg --configure -a

apt Command

The apt-based installation is usually carried out where interaction with online sources is required. However, apt is effective in local installations as well.

Syntax:

The following apt’s syntax is used to install any “.deb” package:

  • Package available in the other than the current directory
sudo apt install <Path-of-the-Deb-Package>
  • Package available in the current directory
sudo apt install ./Name-of-the-Package

Example:

Here is the one-step command to install the package:

sudo apt install ./

That’s it. The package’s application or executable is available to use.

Additional Approach: GDebi Installer

GDebi is known for its GUI support. However, it can be invoked from the terminal to install a deb-based package. First, you have to install it from the terminal using the command:

sudo apt install gdebi

Syntax to Install the Deb Package:

Once the GDebi is installed, you can use the below syntax to install the “.deb” based packages:

sudo gdebi <Package-Path>

These were the possible command line approaches to install a deb package.

GUI Methods to Install Deb Files/Packages on Ubuntu 24.04

Ubuntu 24.04 is equipped with GNOME 46, a more stable and feature-enriched GNOME version as compared to its previous releases. Using Ubuntu 24.04, you can install Deb files/packages via the GNOME Software or the GDebi installer the Synaptic Manager. Let’s discuss them explicitly:

GNOME Software on Ubuntu 24.04

Gnome software is the GUI application to deals with the local and online debian packages. It is not installed on Ubuntu 24.04 by default. However, you can do it as:

sudo apt install gnome-software

Here, you have two options to install a deb package, either the debian package file is downloaded already or process the installation from the store:

  • If the Deb Package is Available Locally | Already Downloaded Deb File

Now, go to the “.deb” package location on your PC and right-click on it to open it with the “Software Install”:

Click on the “Install” button:

The selected package discord is now installed:

  • To Download/Install the Debian Package From the GNOME Software

Downloading the file explicitly and then installing it may be a tedious task. Most of the debian packages are available on the GNOME Software GUI application. To get any of these, open the Software Store and search for the debian package of the desired application:

Click on the source button (dropdown button) to check the package type, i.e., DEB. To install it, click on the “Install” button and soon the package will be installed:

GDebi Package Installer

First install it using the “sudo apt install gdebi” and open the deb file using the GDebi package:

Now, “Install Package” following the onscreen instructions:

The package will be installed.

How to Completely Remove Deb Files/Packages From Ubuntu 24.04

Like the installation methods, the deb packages/files offer the same number of methods to remove the deb file packages. Let’s get into these:

Using dpkg Command

The following dpkg commands are used to remove the “.deb” based installations:

  • To remove the package only
sudo dpkg -r <deb-package>

  • To remove/uninstall the package and the configurations (purge):
sudo dpkg -P <deb-package>

Using apt Command

With the apt command, you can control the removal of the “.deb” based installations with more options, i.e., removing a package only, removing package/dependencies, or configurations:

  • Remove the Package Only
sudo apt remove <deb-package>
  • Remove the Package and its dependencies
sudo apt autoremove <deb-package>
  • Remove Package and all the associated dependencies/configurations
sudo apt autoremove <deb-package> --purge

Using the GNOME Software

Open the deb package using the GNOME Software and click on the “Remove” icon as shown below:

Proceed with the instructions and the package will be removed:

Using GDebi Installer

Launch the debian package file using the GDebi installer and you will see the “Remove Package” button. Clicking it will remove the selected package:

So, these are the methods to install the debian packages on Ubuntu 24.04.

Bottom Line

Ubuntu (like other distributions) supports a specific package type and “deb” is Ubuntu’s standard package type. Ubuntu 24.04 offers the apt and the dpkg commands to manage these packages from the command line. However, you can use the GNOME Software application or the GDebi installer to install the “deb” packages through GUI.

All these methods are demonstrated practically on Ubuntu 24.04 Noble Numbat.

Print Friendly, PDF & Email
Categories