3 Command Line Tools to Install Local Debian (.DEB) Packages

Debian is one of the most popular Linux distributions among users, and it uses .deb package format to install software packages. These packages contain all necessary files and instructions for installing software on your system. While there are several ways to install Debian packages, using the command line is the most efficient way. In this article, we will discuss three command-line tools that can be used to install local Debian packages.

APT (Advanced Package Tool)

APT is the default package manager in Debian, and it can be used to install packages from repositories or local packages. To install a local Debian package using APT, follow these steps

  • Step 1 Open a terminal and navigate to the directory where the .deb package is saved using the cd command.

  • Step 2 Run the following command to install the package

sudo apt install ./packagename.deb

Note Replace packagename.deb with the actual name of the package.

  • Step 3 APT will prompt you to enter your password. Enter your password and press Enter.

  • Step 4 APT will automatically resolve and install the package along with any dependencies required.

Example

Let's say you have downloaded the Google Chrome .deb package and saved it in the Downloads directory. To install the package, follow these steps

cd ~/Downloads
sudo apt install ./google-chrome-stable_current_amd64.deb

APT will automatically handle dependency resolution and installation.

DPKG (Debian Package)

DPKG is a low-level command-line tool that is used to install, remove, and manage Debian packages. Unlike APT, DPKG does not handle dependencies automatically. To install a local Debian package using DPKG, follow these steps

  • Step 1 Open a terminal and navigate to the directory where the .deb package is saved using the cd command.

  • Step 2 Run the following command to install the package

sudo dpkg -i packagename.deb

Note Replace packagename.deb with the actual name of the package.

  • Step 3 If there are missing dependencies, run the following command to fix them

sudo apt install -f

Example

Let's say you have downloaded the VLC media player .deb package. To install it using DPKG

cd ~/Downloads
sudo dpkg -i vlc.deb
sudo apt install -f

The second command resolves any dependency issues that may occur during installation.

GDEBI (GNOME Debian Package Installer)

GDEBI is a command-line and graphical tool that provides better dependency resolution than DPKG while being simpler than APT. It's specifically designed for installing local .deb packages. To install GDEBI, run the following command

sudo apt install gdebi-core

Once GDEBI is installed, you can use it to install local Debian packages by following these steps

  • Command-line usage Run the following command

sudo gdebi packagename.deb
  • GUI usage Right-click on the .deb package and select "Open With GDebi Package Installer."

Example

To install a Dropbox .deb package using GDEBI

sudo gdebi dropbox.deb

GDEBI will automatically check dependencies and prompt for confirmation before installation.

Comparison

Tool Dependency Resolution Interface Best For
APT Automatic Command-line General package management
DPKG Manual Command-line Low-level package operations
GDEBI Automatic CLI + GUI Local .deb packages

Package Management Operations

Uninstalling Packages

# Using APT
sudo apt remove packagename

# Using DPKG  
sudo dpkg -r packagename

# Using GDEBI (command-line)
sudo gdebi --remove packagename

Checking Package Status

# Using APT
apt list packagename

# Using DPKG
dpkg -s packagename

# Check all installed packages
dpkg -l

Conclusion

APT, DPKG, and GDEBI each serve different purposes for installing local Debian packages. APT offers the best overall experience with automatic dependency resolution, DPKG provides low-level control for advanced users, and GDEBI specializes in local package installation with both command-line and GUI options. Choose the tool that best fits your specific needs and experience level.

Updated on: 2026-03-17T09:01:38+05:30

3K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements