dpkg

Debian package manager (low level)

high risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
What it does

Installs .deb files and queries installed packages.

Common flags
FlagMeaning
-lList packages
-LFiles of a package
-SWhich package owns a file
-iInstall a .deb
--purge --purgeRemove with config
Examples
dpkg -l | grep nginxIs it installed? · explain & risk-check →
dpkg -S /usr/bin/lsOwner · explain & risk-check →
Related
apt
Open the full explainer →More in Packages & Build

Reference text is hand-written and may be incomplete — check man dpkg for your version. Test destructive commands on a non-production system first.