Friday, December 27, 2024
Google search engine
HomeGuest BlogsHow to Install Deb Files (Packages) on Ubuntu

How to Install Deb Files (Packages) on Ubuntu

Introduction

A deb package (.deb file) is a software package in a specific format designed for Debian-based distributions recognized by the .deb extension. Deb packages allow installing local software on an Ubuntu system.

This article shows several ways to install and remove deb packages on Ubuntu.

tutorial on installing deb packages on Ubuntututorial on installing deb packages on Ubuntu

Prerequisites

  • A system running Ubuntu.
  • Access to terminal window/command line.
  • User with root/sudo privileges.

Install deb Files Using GUI

Installing deb files through the GUI is straightforward and convenient. Below are the two most common options that allow installing deb packages through the user interface.

Option 1: Software Center

To install a deb package with the Software Center (Ubuntu Software), follow the simple steps below:

1. Locate the downloaded deb package. By default, the system stores downloaded files in the Downloads directory.

Deb package in DownloadsDeb package in Downloads

2. Right-click the deb file and choose Open with Another Application.

3. Select Software Install from the program list.

deb file Open with Software Installer menudeb file Open with Software Installer menu

A new dialogue box opens with details about the software.

4. Click on the Install button to proceed.

deb package install from software centerdeb package install from software center

5. Enter the user’s password when prompted and press Enter to authenticate.

Software installation authentication requestSoftware installation authentication request

6. Wait for the installation to complete. When finished, the software is ready to use.

Option 2: GDebi GUI

GDebi is a simple tool for installing local deb packages. The program also identifies all the required dependencies and automatically downloads and installs them using the apt package manager. GDebi is available both as a command-line and GUI tool.

Note: GDebi does not come on Ubuntu by default. To install it, use the following command:

sudo apt install gdebi -y

To install a deb package using the GDebi GUI, follow these steps:

1. Open the file manager and locate the deb file.

2. Right-click on the deb file and choose Open With Other Application.

3. Mark the GDebi Package Installer and click Select.

GDebi select installer menuGDebi select installer menu

4. The installer loads the deb package and shows the software description. Click Install Package to start the installation.

GDebi GUI installerGDebi GUI installer

5. Provide the user password when prompted and press Enter.

6. Wait for the installation to complete. Once done, the software is ready to use.

Install deb Files using the Terminal

The Ubuntu terminal enables installing packages using different package managers and commands. Below are a few options to install deb packages using terminal commands.

Option 1: dpkg Command

The dpkg command a is a package manager for installing, removing, and building packages.

To install a deb package using the dpkg command, run the following command:

sudo dpkg -i <package path>
sudo dpkg -i terminal outputsudo dpkg -i terminal output

Provide the user’s password and wait for the installation to complete. If a package relies on unavailable dependencies, the dpkg command returns an error. Download any dependencies manually.

Option 2: apt Package Manager

The apt command runs the apt package manager software. To install a deb package using the apt command, run:

sudo apt install <package path>
sudo apt install deb package terminal outputsudo apt install deb package terminal output

Provide the user’s password if prompted. The package manager also locates and installs any dependencies automatically.

Option 3: GDebi Package Installer

The GDebi tool also works as a command-line tool for package installation. To install a deb package with GDebi in the command line, run the following in the terminal:

sudo gdebi <package path>
sudo gdebi install deb packagesudo gdebi install deb package

Press Y to confirm the installation and enter the user’s password.

How to Remove deb Packages

There are several different ways to remove a previously installed deb package. The removal method depends on how the package was initially installed.

Below are examples of several options to remove deb packages from the system.

Option 1: Software Center

To remove a deb package using the software center, do the following:

1. Open the Ubuntu Software application.

Applications Ubuntu softwareApplications Ubuntu software

2. Navigate to the Installed tab.

Ubuntu Software Installed tabUbuntu Software Installed tab

3. Locate the software you want to remove. Click Uninstall to remove the application.

software center uninstall buttonsoftware center uninstall button

4. Confirm the uninstallation and provide the user’s password to complete the software removal.

Option 2: GDebi GUI

To uninstall software with Gdebi, do the following:

1. Locate the .deb package file on the system.

2. Right-click the file and select Open With Other Application.

3. Choose GDebi Package Installer from the list.

4. Click Remove Package to uninstall the software.

GDebi remove packageGDebi remove package

5. Provide the user’s password and wait for the uninstall process to complete.

Option 3: dpkg Command

To remove packages installed with dpkg, use the following command in the terminal:

sudo dpkg -r <software name>
sudo dpkg -r package terminal outputsudo dpkg -r package terminal output

Use the official package name (not the .deb file name) in the command.

Option 4: apt Package Manager

To uninstall a package using the apt command, run the following:

sudo apt remove <software name>
sudo apt remove package terminal outputsudo apt remove package terminal output

Press Y to confirm the removal.

The method works if the initial installation was through the Ubuntu software center or the apt package manager.

Conclusion

You now know several ways to install and remove local software packages (.deb) on Ubuntu. Next, see different ways to list installed packages on Ubuntu.

Was this article helpful?
YesNo

RELATED ARTICLES

Most Popular

Recent Comments