First, the dpkg command a little solution
Debian, and Debian-based systems such as Ubuntu, use the package format Deb. The following is the operation of the Deb package Common Dpkg instruction table, for Beginners friends reference.
Dpkg is a Debian package management tool. The ability to install, uninstall, get information, and other operations on the package.
Command function dpkg-i package.deb Install package Dpkg-r Package Remove Packages Dpkg-p Package Delete packages (including configuration files) Dpkg-l The package lists the files associated with the packages dpkg-l Packag e Displays the version of the package dpkg--unpack Package.deb Unpack the contents of the Deb Package dpkg-s keyword search for the package content Dpkg-l list the currently installed packages dpkg-c Package.deb list The contents of the Deb package DPKG--configure Package Configuration Pack
Usage:
Install (Unpack and configure):
Dpkg-i Package_file
Dpkg--install Package_file
Unpack
Dpkg--unpack Package_file
This command only unlocks "Package_file" and does not perform package configuration work.
Configuration package:
Dpkg--configure Package
To uninstall a package:
Dpkg-r Package
Dpkg--remove Package
The command deletes the package, but retains the configuration file.
Dpkg-p Package
Dpkg--purge Package
This command deletes the package and deletes the configuration file.
Gets, sets, clears the selection state of the package:
DPKG--get-selections [Package]
Output to standard output, you can use pipe or redirect.
Dpkg--set-selections
Obtained from standard input, you can use pipelines or redirects.
Dpkg--clear-selections
Mark all packages as unloaded.
Options:
-B
--auto-deconfigure
When the package is uninstalled, all packages that depend on the unloaded package are automatically unloaded.
--no-act
--dry-run
--simulate
Test only, get output, do not make any modifications to the system.
There are also options that specify the tasks that are actually given to Dpkg-deb, Dpkg-query complete:
Dpkg-deb:
-B | --build
-C | --contents
-E | --control
-X | -extract
-F | --field
-I. | --info
-X | --vextract
Dpkg-query
-L | --list
-S | --status
-L | --listfiles
-S | --search
-P | --print-avail
Related documents:
/var/lib/dpkg/available package information.
/var/lib/dpkg/status Package Status.
Software Installation method under Linux (dpkg, APT)