3 Ways to Install Deb Files on Ubuntu, Debian & Mint (2024)

In this tutorial, you will learn how to install local software packages (.DEB) in Debian and its derivatives such as Ubuntu and Linux Mint using three different command line tools and they are dpkg, apt, and gdebi.

This is useful to those new users who have migrated from Windows to Ubuntu or Linux Mint. The very basic problem they face is installing local software on the system.

However, Ubuntu and Linux Mint have their own Graphical Software Center for easy software installation, but we will be looking forward to installing deb packages through the terminal way.

1. Install .deb Package Using dpkg Command

Dpkg is a package manager for Debian and its derivatives such as Ubuntu and Linux Mint. It is used to install, build, remove, and manage .deb packages. but unlike other Linux package management systems, it cannot automatically download and install packages with their dependencies.

To install a .deb package, use the dpkg command with the -i flag along with the package name as shown.

$ sudo dpkg -i teamviewer_amd64.deb
3 Ways to Install Deb Files on Ubuntu, Debian & Mint (1)

If you get any dependency errors while installing or after installing and launching a program, you can use the following apt command to resolve and install dependencies using the -f flag, which tells the program to fix broken dependencies.

$ sudo apt-get install -f

Remove Deb Packages Using dpkg Command

To remove a .deb package use the -r option or if you want to remove all its files including configuration files, you can purge it using the --purge option as shown.

$ sudo dpkg -r teamviewer [Remove Package]$ sudo dpkg --purge teamviewer [Remove Package with Configuration Files]
3 Ways to Install Deb Files on Ubuntu, Debian & Mint (2)

To know more about installed packages, read our article that shows how to list all files installed from a .deb package.

2. Install .deb Package Using Apt Command

The apt command is an advanced command-line tool, which offers new software package installation, existing software package upgradation, updating of the package list index, and even upgrading the whole Ubuntu or Linux Mint system.

It also offers apt-get and apt-cache command-line tools for managing packages more interactively on Debian and its derivatives such as Ubuntu and Linux Mint systems.

Essentially, apt-get or apt do not understand .deb files, they are designed to primarily handle package names (for example teamviewer, apache2, mariadb, etc..) and they retrieve and install .deb archives associated with a package name, from a source specified in the /etc/apt/sources.list file.

The only trick to installing a .deb Debian package using apt-get or apt is by specifying a local relative or absolute path (./ if in current dir) to the package, otherwise it will try to retrieve the package from remote sources and the operation will fail.

$ sudo apt install ./teamviewer_amd64.deb$ sudo apt-get install ./teamviewer_amd64.deb
3 Ways to Install Deb Files on Ubuntu, Debian & Mint (3)
3 Ways to Install Deb Files on Ubuntu, Debian & Mint (4)

Remove Deb Packages using apt Command

To remove a .deb package use the remove option or if you want to remove all its files including configuration files, you can purge it using the purge option as shown.

$ sudo apt-get remove teamviewer$ sudo apt-get purge teamviewerOR$ sudo apt remove teamviewer$ sudo apt purge teamviewer

3. Install .deb Package Using Gdebi Command

gdebi is a tiny command line and GUI tool for installing local deb packages. It resolves and installs package dependencies on the fly. To install a package, use the following command.

$ sudo gdebi teamviewer_13.1.3026_amd64.deb
3 Ways to Install Deb Files on Ubuntu, Debian & Mint (5)

To remove a .deb package installed from gdebi, you can use apt, apt-get or dpkg commands using purge option as shown.

$ sudo apt purge teamviewerOR$ sudo apt-get purge teamviewerOR$ sudo dpkg --purge teamviewer

Install .deb Packages Using Gdebi GUI

The most recommended way for beginners to installing .deb files is through the Gdebi GUI installer. Simply, go to the directory where you have downloaded the file and double-click to install it as shown.

3 Ways to Install Deb Files on Ubuntu, Debian & Mint (6)

That’s It! In this tutorial, we have explained three different command line tools for installing or removing .deb Debian packages in Ubuntu and Linux Mint.

If you know any other way of installing local packages, do share with us using our comment section below.

Certainly! I'm well-versed in package management in Debian-based systems like Ubuntu and Linux Mint. Here's a breakdown of the concepts and tools mentioned in the article:

Concepts:

  1. .DEB Packages: These are software packages in a format used by Debian-based systems for installation and removal of applications and software.

  2. Package Manager: Software used to manage installation, removal, and maintenance of software packages on a system.

Tools:

  1. dpkg Command:

    • Purpose: It's the core package manager for Debian-based systems.
    • Functionality: Installs, builds, removes, and manages .deb packages.
    • Example Usage:
      sudo dpkg -i package_name.deb # Install a .deb package
      sudo dpkg -r package_name     # Remove a .deb package
      sudo dpkg --purge package_name # Remove a .deb package with configuration files
  2. apt Command:

    • Purpose: Advanced package management tool for handling dependencies and package retrieval.
    • Functionality: Manages package installation, upgrading, and system updates.
    • Example Usage:
      sudo apt install ./package_name.deb # Install a .deb package
      sudo apt remove package_name        # Remove a .deb package
      sudo apt purge package_name         # Remove a .deb package with configuration files
  3. gdebi Command:

    • Purpose: Command-line and GUI tool for installing local .deb packages.
    • Functionality: Resolves and installs package dependencies on-the-fly.
    • Example Usage:
      sudo gdebi package_name.deb # Install a .deb package
      sudo apt purge package_name # Remove a .deb package installed via gdebi

These tools allow users to install, remove, and manage .deb packages through the command line or graphical interface. They handle dependencies, ensuring smooth installation and removal of software on Debian-based systems. The article serves as a guide for new users transitioning from Windows to Ubuntu or Linux Mint, providing them with insights into managing software using terminal commands.

3 Ways to Install Deb Files on Ubuntu, Debian & Mint (2024)

FAQs

How do I install a .deb file in Ubuntu? ›

Usually, the system saves the downloaded files in the Downloads directory. Right-click the deb file and select Open with Another Application from the context menu. Choose Software Install from the program list. To proceed, click the Install button.

How do I install a .deb file in mint? ›

If you're using Linux Mint, you can install the DEB file now through Gdebi by double-clicking it in your file manager and selecting Install Package. If you're using Ubuntu or Debian and want to use the Gdebi GUI, open your file manager, right-click the DEB file, and select Open with Other Application.

Which command is used to install a .deb file in Linux? ›

Installing DEB files in Linux is a straightforward process that can be done either graphically using a package manager or through the terminal using the dpkg command. The graphical method is more user-friendly and suitable for most users, while the terminal method offers greater flexibility and control.

How to create deb packages for Debian Ubuntu? ›

deb package, you can easily install and manage software on your system.
  1. Step 1: Create the directories. ...
  2. mkdir helloworld && mkdir helloworld/DEBIAN. ...
  3. Step 2: Copy files into your package. ...
  4. mkdir -p helloworld/usr/local/bin cp /usr/local/bin/helloworld.sh helloworld/usr/local/bin/ ...
  5. Step 3: Create the control file.

How to install a .deb file in Debian? ›

Installing deb package on Ubuntu/Debian
  1. Install gdebi tool and then open and install the . deb file using it.
  2. Use dpkg and apt-get command line tools as follows: sudo dpkg -i /absolute/path/to/deb/file sudo apt-get install -f.

How to install deb file? ›

Method 3: Install . deb file using gdebi GUI
  1. Step 1: Install gdebi.
  2. Setup 2: Launch gdebi-gtk.
  3. Step 3: Open the . deb file.
  4. Step 4: Install the package and dependencies.
Dec 11, 2023

Does .deb work in mint? ›

deb packaged for Debian will work in Ubuntu or Mint. Programs installed via . deb files are installed using the apt packaging system, whether it's synaptic or gdebi or whatever. Therefor they're updated just like any software installed from the software center.

What file system to install Linux Mint? ›

Linux Mint requires one partition to be mounted on the root / directory. The Linux Mint operating system (without additional software or personal data) takes roughly 15GB, so give this partition a decent size (100GB or more). ext4 is recommended. It is the most popular Linux filesystem.

Is Linux Mint a deb? ›

Linux Mint is a derivative of Ubuntu, which is a derivative of Debian, which created the DEB package format. Hence, Linux Mint is a DEB-based Linux distribution.

How to install deb via terminal? ›

If you want to install deb packages in the command line, you can use either the apt command or the dpkg command. The apt command uses the dpkg command underneath it, but apt is more popular and easier to use. In both commands, you should replace path_to_deb_file with the path and name of the deb file you've downloaded.

What is deb command in Debian? ›

So, deb is an abbreviation for Debian package, as opposed to source package. You can install a downloaded Debian package using dpkg in a terminal: dpkg -i *. deb (where *. deb is the path and name of the package you downloaded).

How will you install a package in Ubuntu? ›

To install a package, locate it via the Not Installed Packages package category by using the keyboard arrow keys and the Enter key. Highlight the desired package, then press the + key.

How do I install custom packages in Debian? ›

To install a custom package, simply copy it to the config/packages. chroot/ directory. Packages that are inside this directory will be automatically installed into the live system during build - you do not need to specify them elsewhere. Packages must be named in the prescribed way.

How to create a deb Debian package? ›

How to Create a Simple Debian Package
  1. Overview. A Debian package is the simplest and most efficient way of distributing software in Debian-based distributions. ...
  2. Preparing the Files. 2.1. ...
  3. Building the Package. With that, we're ready to build our package. ...
  4. Verify the Package. 4.1. ...
  5. Conclusion.
Mar 18, 2024

What is the difference between debuild and dpkg-Buildpackage? ›

The difference between those two is that debuild is several tools in one whereas dpkg-buildpackage is just 1 step in the Debian package building process. Debuild is a front-end wrapper for dpkg-buildpackage , lintian , fakeroot and debsign .

How to install a deb file in terminal? ›

Methods to Install . deb Files
  1. sudo dpkg -i package_name.deb.
  2. sudo apt install ./package_name.deb.
  3. sudo apt update.
  4. sudo apt install gdebi.
  5. sudo gdebi example.deb.
  6. sudo apt install gdebi -y.
  7. sudo dpkg --force-overwrite -i package_name.deb.
  8. sudo dpkg -r package_name.
Dec 24, 2023

How to install packages in Ubuntu terminal? ›

The apt command is a powerful command-line tool, which works with Ubuntu's Advanced Packaging Tool (APT). The commands contained within apt provide the means to install new software packages, upgrade existing software packages, update the package list index, and even upgrade the entire Ubuntu system.

Are deb files for Ubuntu? ›

'Deb' packages are the heart of Ubuntu

The 'deb' package format comes from the Debian Linux distribution and is widely considered the best package format for system-level libraries and applications with rich and dynamic dependencies.

How to install Chrome deb file in Ubuntu using terminal? ›

How to install Chrome on Ubuntu through the terminal
  1. Launch the terminal.
  2. Type this command: sudo dpkg -i google-chrome-stable_current_amd64.deb.
  3. Enter your password.
  4. You can use the following command if you see any errors: sudo apt -f install.
Dec 22, 2023

Top Articles
Latest Posts
Article information

Author: Tyson Zemlak

Last Updated:

Views: 5601

Rating: 4.2 / 5 (43 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Tyson Zemlak

Birthday: 1992-03-17

Address: Apt. 662 96191 Quigley Dam, Kubview, MA 42013

Phone: +441678032891

Job: Community-Services Orchestrator

Hobby: Coffee roasting, Calligraphy, Metalworking, Fashion, Vehicle restoration, Shopping, Photography

Introduction: My name is Tyson Zemlak, I am a excited, light, sparkling, super, open, fair, magnificent person who loves writing and wants to share my knowledge and understanding with you.