Install .deb Files on Kali Linux

Deepak Prasad
Tested on Kali GNU/Linux Rolling 2026.2 (kali-rolling)
Package apt 3.2.0+kali1
dpkg 1.23.7+kali1
Applies to Kali Linux (amd64)
Privilege sudo for install, remove, and fix-broken operations
Scope Download and verify a local .deb, inspect metadata and maintainer scripts, install with apt install ./file.deb or dpkg -i, verify and remove by package name, upgrade from a newer .deb, and fix common dependency and path errors. Does not cover building .deb packages, adding vendor apt repositories, Flatpak, Snap, or AppImage.
Related guides apt command in Linux
dpkg command in Linux
Install Tor Browser on Kali Linux
Ethical hacking tutorial

Kali Linux is Debian-based, so it installs .deb binary packages with the same apt and dpkg tools you use on Debian. Vendor downloads and lab bundles often arrive as a single .deb file instead of a repository entry, which pushes you toward local-file install syntax and dependency troubleshooting.

This guide keeps apt install ./package.deb as the default path, shows inspection commands before you trust a download, and walks through verification, removal, and the errors you see when the path, architecture, or dependencies are wrong. Commands were captured with a figlet package downloaded from Kali rolling into /tmp/deb-install-lab.

IMPORTANT
A .deb file runs maintainer scripts as root during installation. APT dependency resolution does not prove a third-party package is trustworthy — verify the publisher, checksum, or signature from the vendor before you install software from outside Kali’s official repositories.

Quick answer — install a .deb on Kali

When the .deb is already in your download folder, this is the command most readers need:

bash
cd ~/Downloads
sudo apt install ./package-name.deb

The ./ prefix matters. apt interprets package-name.deb without a path as a repository package name, not a file on disk. ./ or a full path such as /home/kali/Downloads/package-name.deb tells apt to treat the argument as a local package file.


Compare .deb installation methods

Pick the tool before you copy a forum one-liner. All three paths end in dpkg unpacking data, but only apt and gdebi consult configured repositories for missing dependencies.

Method Dependency resolution Best use
apt install ./file.deb Downloads deps from configured repos Normal installation on Kali
dpkg -i file.deb No automatic dependency download Low-level install or debugging
gdebi file.deb Resolves deps like apt Optional frontend (gdebi-core not required)

dpkg -i is not a complete offline installer unless every dependency is already on the system or available on local media you install manually. After a failed dpkg -i, use sudo apt --fix-broken install and read the proposed transaction before you confirm.


Kali lab setup for a local .deb

The walkthrough below uses a small figlet .deb pulled from Kali rolling so every command produces reproducible output without hunting a random vendor download.

Set lab variables once:

bash
LAB=/tmp/deb-install-lab
mkdir -p "$LAB"
cd "$LAB"

Download the package file from your configured mirror (here figlet from kali-rolling):

bash
apt download figlet
output
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Get:1 http://kali.download/kali kali-rolling/main amd64 figlet amd64 2.2.5-3.1 [137 kB]
Fetched 137 kB in 1s (149 kB/s)

The Get:1 … kali-rolling/main amd64 figlet line confirms the index matches your rolling repository. A permission warning about _apt and unsandboxed download is common when root owns the target directory; the .deb still lands in "$LAB".

Point DEB at the downloaded filename for the rest of the article:

bash
DEB=figlet_2.2.5-3.1_amd64.deb
ls -la "$DEB"
output
-rw-r--r-- 1 root root 136780 Dec 22  2025 figlet_2.2.5-3.1_amd64.deb

Confirm your CPU architecture before you install foreign .deb files:

bash
dpkg --print-architecture
output
amd64

On this lab host, amd64 matches the _amd64.deb suffix in the filename.


Verify the download before installation

Inspection happens before sudo apt install. You are checking publisher identity, file integrity, architecture, dependencies, and whether the filename matches the internal package name.

Confirm the file type:

bash
file "$DEB"
output
figlet_2.2.5-3.1_amd64.deb: Debian binary package (format 2.0), with control.tar.xz , data compression xz

Compare a vendor checksum when one is published:

bash
sha256sum "$DEB"
output
010fea18548d0a80b133a1137d76afc84c7968f01e8487020e82dc42bc718a60  figlet_2.2.5-3.1_amd64.deb

Match that hash against the value on the vendor download page. A checksum match proves file integrity, not publisher identity — prefer signed packages or downloads from the vendor’s official site.

Read package metadata and dependency lines:

bash
dpkg-deb --info "$DEB"
output
new Debian package, version 2.0.
 size 136780 bytes: control archive=2796 bytes.
 Package: figlet
 Version: 2.2.5-3.1
 Architecture: amd64
 Maintainer: Carlos Laviola <claviola@debian.org>
 Installed-Size: 746
 Depends: libc6 (>= 2.38)
 Section: text
 Priority: optional
 Homepage: https://www.figlet.org/
 Description: Make large character ASCII banners out of ordinary text

The Package: line is the name you use for apt remove and dpkg -s — not figlet_2.2.5-3.1_amd64.deb. Depends: lists libraries apt may pull from Kali repositories when you install with apt install ./file.deb.


Inspect package contents and maintainer scripts

List files the package will place on disk:

bash
dpkg-deb --contents "$DEB" | head -15
output
drwxr-xr-x root/root         0 2025-12-12 10:33 ./
drwxr-xr-x root/root         0 2025-12-12 10:33 ./etc/
...
-rwxr-xr-x root/root     55672 2025-12-12 10:33 ./usr/bin/figlet-figlet
-rwxr-xr-x root/root       315 2025-12-12 10:33 ./usr/bin/figlet-utf8
...

Paths under ./usr/bin/ show which binaries ship in the archive. The installed figlet command may be provided through update-alternatives rather than a literal usr/bin/figlet file in the listing.

Extract control metadata to read postinst and prerm script names:

bash
dpkg-deb --info "$DEB" | grep -E 'postinst|prerm'
output
376 bytes,    15 lines   *  postinst             #!/bin/sh
     145 bytes,    10 lines   *  prerm                #!/bin/sh

Those maintainer scripts run as root during install and removal. For a deeper manual review, extract the archive to a throwaway directory:

bash
dpkg-deb --extract "$DEB" "$LAB/extract-tree"

Do not run dpkg-deb --extract on production paths as a substitute for apt install — extraction alone does not register the package in the dpkg database.


Install a .deb with apt

apt install ./file.deb is the recommended path on Kali. apt calls dpkg to unpack the local file and can install missing dependencies from your enabled mirrors.

If the package is already installed from a prior test, remove it first so the install transcript shows a clean unpack:

bash
sudo apt remove -y figlet

Install from the local file with the ./ prefix:

bash
sudo apt install -y "./$DEB"
output
Selecting previously unselected package figlet.
Preparing to unpack …/figlet_2.2.5-3.1_amd64.deb…
Unpacking figlet (2.2.5-3.1)…
Setting up figlet (2.2.5-3.1)…
update-alternatives: using /usr/bin/figlet-utf8 to provide /usr/bin/figlet (figlet) in auto mode
Processing triggers for man-db (2.13.1-1)…
Processing triggers for kali-menu (2026.2.6)…

Setting up means postinst completed and the package is registered as installed. Future upgrades for this package require another downloaded .deb or an apt repository that publishes figlet — a one-time local install does not add a vendor repo automatically.

Without ./, apt searches repository indexes and fails:

bash
sudo apt install -y "$DEB"
output
Error: Unable to locate package figlet_2.2.5-3.1_amd64.deb

That error is the common “missing ./” mistake — not a broken .deb file.


Install a .deb with dpkg

dpkg -i unpacks the archive directly. Use it when you are debugging packaging issues or when every dependency is already satisfied.

Remove the package again for a side-by-side comparison:

bash
sudo apt remove -y figlet

Install with the low-level tool:

bash
sudo dpkg -i "$DEB"
output
Selecting previously unselected package figlet.
Preparing to unpack figlet_2.2.5-3.1_amd64.deb…
Unpacking figlet (2.2.5-3.1)…
Setting up figlet (2.2.5-3.1)…
update-alternatives: using /usr/bin/figlet-utf8 to provide /usr/bin/figlet (figlet) in auto mode
Processing triggers for kali-menu (2026.2.6)…
Processing triggers for man-db (2.13.1-1)…

figlet only depends on libc6, which is already on the system, so this lab run did not leave a broken package. When dpkg -i stops with dependency problems or unconfigured status, repair with:

bash
sudo apt --fix-broken install
output
Summary:
  Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 816

Read the Summary block before you press y. --fix-broken may install missing libraries from Kali repos or propose removing a half-installed package that cannot be configured.


Verify the installed package

After install, confirm status, files on disk, repository tracking, and the binary path. Use the package name from dpkg-deb --info, not the .deb filename.

Check install status:

bash
dpkg -s figlet | head -12
output
Package: figlet
Status: install ok installed
Priority: optional
Section: text
Installed-Size: 746
Maintainer: Carlos Laviola <claviola@debian.org>
Architecture: amd64
Version: 2.2.5-3.1
Depends: libc6 (>= 2.38)

Status: install ok installed means configure finished cleanly.

List installed paths:

bash
dpkg -L figlet | head -12
output
/.
/etc
/etc/emacs
/etc/emacs/site-start.d
/etc/emacs/site-start.d/50figlet.el
/usr
/usr/bin
/usr/bin/chkfont
/usr/bin/figlet-figlet
/usr/bin/figlet-utf8
/usr/bin/figlist
/usr/bin/showfigfonts

See whether apt still tracks the same version from kali-rolling:

bash
apt-cache policy figlet
output
figlet:
  Installed: 2.2.5-3.1
  Candidate: 2.2.5-3.1
  Version table:
 *** 2.2.5-3.1 500
        500 http://http.kali.org/kali kali-rolling/main amd64 Packages
        100 /var/lib/dpkg/status

Confirm the command you actually run:

bash
command -v figlet
output
/usr/bin/figlet

If command -v returns nothing while dpkg -s shows installed, check dpkg -L for binary paths or an update-alternatives entry — some packages do not ship a binary matching the package name.


Remove or purge a .deb package

Removal uses the package name from dpkg metadata. The original .deb filename is not an apt remove argument.

Remove the application but keep configuration files the package marked as conffiles:

bash
sudo apt remove figlet
output
REMOVING:
  figlet

Summary:
  Upgrading: 0, Installing: 0, Removing: 1, Not Upgrading: 816
  Freed space: 764 kB

The REMOVING: line names the dpkg package, not the .deb filename.

Purge drops package-managed configuration as well:

bash
sudo apt purge figlet

Clean up dependencies that are no longer required:

bash
sudo apt autoremove

User-created files under your home directory and data outside dpkg’s file list are not removed by purge. Desktop launchers from third-party .deb files may need manual cleanup if the vendor installed them outside standard paths.


Upgrade or downgrade from a local .deb

When a vendor ships a newer .deb, download it and install over the existing package:

bash
sudo apt install -y "./new-version.deb"

Before you downgrade to an older .deb, inspect version, Depends, and reverse dependencies with dpkg-deb --info and apt-cache rdepends package. Downgrades can break tools that already linked against newer libraries on a rolling Kali system.

Do not treat dpkg --force-downgrade or aggressive force flags as a default fix. Resolve conflicts by choosing a compatible package build or restoring from backup instead of forcing dpkg past safety checks.


Optional install with gdebi

gdebi-core is available on Kali rolling but not installed by default:

bash
apt-cache policy gdebi-core
output
gdebi-core:
  Installed: (none)
  Candidate: 0.9.5.8
  Version table:
     0.9.5.8 500
        500 http://http.kali.org/kali kali-rolling/main amd64 Packages

After sudo apt install gdebi-core, sudo gdebi ./package.deb resolves dependencies through the same repositories as apt install ./package.deb. Use gdebi when you prefer its prompts — not because it is inherently safer than apt.


Troubleshoot .deb installation on Kali

Symptom Likely cause Fix
Unable to locate package file.deb Missing ./ or path sudo apt install ./file.deb or use absolute path
Unsupported file … given on commandline Wrong apt argument shape Pass one local path; avoid mixing unrelated package names
package architecture (arm64) does not match system (amd64) Wrong .deb CPU arch dpkg-deb --info vs dpkg --print-architecture
dependency problems prevent configuration Missing libraries sudo apt --fix-broken install; review Summary before confirming
dpkg: error processing package … half-installed state Prior failed dpkg -i dpkg -s pkg; apt --fix-broken install or apt purge pkg
Conflicts: … / Breaks: errors Incompatible package replaces core libs Do not install; find a Kali-built or vendor Kali package
trying to overwrite … which is also in package File overlap with installed package Remove conflicting package or pick a different build
Requires Debian … / wrong libc6 version .deb built for another distro release Use packages built for Kali rolling or vendor Kali builds
App installed but command missing Binary name differs from package name dpkg -L pkg; command -v; check update-alternatives
No desktop launcher Vendor skipped .desktop file Launch from terminal or create your own launcher
apt proposes removing kali-linux-* metapackages Third-party .deb conflicts with Kali stack Cancel — do not confirm destructive transactions
Vendor .deb replaces libc6, openssl, or python3 Aggressive vendor packaging Reject install; use container or official Kali packages
Checksum mismatch Corrupt download or wrong file Re-download; verify SHA256 from vendor

When apt shows a transaction that removes core Kali metapackages or system libraries, stop and investigate the .deb vendor. Dependency resolution is not a safety filter for malicious or poorly built packages.


References


Summary

Installing a .deb on Kali is straightforward when you treat the file as a local package path, not a repository name. sudo apt install ./package.deb is the default: it unpacks through dpkg, pulls compatible dependencies from your configured kali-rolling mirrors, and registers the package so dpkg -s and apt policy can report status afterward.

Before you install vendor software, inspect with file, sha256sum, and dpkg-deb --info, and remember that maintainer scripts run as root. APT cannot make an untrusted download safe merely because dependencies resolved. Use the Package: field from control metadata for apt remove, apt purge, and verification commands — the .deb filename is only for the install path.

When dpkg -i leaves a package unconfigured, sudo apt --fix-broken install is the repair path, but always read the proposed install or remove list before you confirm. For mirror and branch problems that affect dependency downloads, fix Kali Linux repositories first, then retry the local .deb install with ./ on the path.

Kennedy Muthii

Information Security Analyst

Accomplished professional proficient in Python, ethical hacking, Linux, cybersecurity, and OSINT. With a track record including winning a national cybersecurity contest, launching a startup in Kenya, and holding a degree in information science, he is currently engaged in cutting-edge research in ethical hacking.

  • Python (programming language)
  • Certified Ethical Hacker
  • White Hat (Computer Security)
  • Linux
  • Penetration Testing