Learn practical, low-level package control to inspect, install, and remove .deb files directly on Debian-based systems. 16.11.2025 | reading time: 3 min dpkg is the low-level Debian package manager that installs, queries and removes .deb files; if you want direct control of package files and the package database, this is the tool to learn and practice. A quick hands-on example Follow along: install a local .deb, inspect status, then remove it; commands and typical output are shown below for practice. ```bash sudo dpkg -i example-package_1.2.3_amd64.deb (Reading database ... 123456 files and directories currently installed.) Unpacking example-package (1.2.3) ... dpkg: dependency problems prevent configuration of example-package: example-package depends on libfoo (>= 2.0). dpkg: error processing package example-package (--install): dependency problems - leaving unconfigured Errors were encountered while processing: example-package sudo apt-get install -f Reading package lists... Done Building dependency tree... Reading state information... Done The following additional packages will be installed: libfoo sudo dpkg -l example-package Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed ||/ Name Version Architecture Description ii example-package 1.2.3 amd64 An example package sudo dpkg -r example-package (Reading database ... 123456 files and directories currently installed.) Removing example-package (1.2.3) ... ``` Useful dpkg actions you will use Try these patterns: use `dpkg -i <file.deb>` to install a .deb, `dpkg -r <package>` to remove the package but keep config files, `dpkg -P <package>` to purge including configs, `dpkg -L <package>` to list installed files and `dpkg -S <path>` to find which package owns a file; when installation fails for missing dependencies, run `apt-get install -f` to correct the situation. Tools that play with dpkg dpkg manages the local package database while higher-level tools like apt and aptitude resolve dependencies and retrieve packages; `dpkg-query` is handy for advanced queries and scriptable output when building maintenance scripts. Where to go next Practice installing, listing and purging packages on a disposable VM until the dpkg database at /var/lib/dpkg becomes familiar, then expand into apt workflows and configuration management for production use and consider formal study; for focused exam preparation see bitsandbytes.academy for intensive courses like CompTIA Linux+ or LPIC-1. Join Bits & Bytes Academy First class LINUX exam preparation. utilities setup troubleshooting