Learn Linux-4 dpkg software package management tool command details when you cannot install software online, if you have manually downloaded one. deb package, you can use the following command 1. install the Debian package file: sudo dpkg-I debfilename 2. list the contents of the package: sudo dpkg-c debfilename 3. from. package information extracted from the deb file: sudo dpkg-I debfilename1 4. uninstall an installed package: sudo dpkg-r packagename 5. completely clear an installed package. Unlike remove, remove only deletes data and executable files. purge also deletes all preparation files: sudo dpkg-P packagename 6. list all files installed in the package. (See dpkg-c to check one. deb file content): sudo dpkg-L packagename 7. show the information of the installed package: sudo dpkg-s 8. re-prepare an installed package. If debconf is used (debconf provides a unified configuration interface for package installation), you can re-prepare debconf itself: sudo dpkg-reconfigure packagename 9. obtain the software package status: sudo dpkg -- get-selections | grep keyname 10. set the software package status. For example, if you HOLD a package, you cannot upgrade it: echo "packagename hold" | sudo dpkg -- set-selections 11. resume Software Package flag from HOLD status: echo "packagename install" | sudo dpkg -- set-selections 12. fix the corrupted dependency package: sudo apt-get-f install 13. other Instructions: in the directory, its subdirectory/var/lib/dpkg/info is used to save the configuration file list of each software package: (1 ). conffiles records the configuration file list of the Ubuntu Software Package (2 ). list to save the file list in the software package. in the list, find the specific installation location of the file in the software package. (3 ). the md5sums records the md5 information of the software package. This information is used for packet verification. (4 ). the prerm script runs before the Debian package unpacks. It is mainly used to stop services acting on the soon-to-be-upgraded Ubuntu package until the package is installed or upgraded. (5 ). the postinst script is used to complete the configuration after the Debian package is unwrapped. It is usually used to execute commands related to the Installed Package and restart the service. the/var/lib/dpkg/available file contains the description of the Ubuntu software package, which includes all the software packages in the Debian installation source used by the current system, these include the installed and uninstalled Ubuntu software packages in the current system. the/var/cache/apt/archives directory is the temporary storage path of the software package/etc/apt/sources when you use apt-getinstall to install the software. list stores the software source site. When you execute sudoapt-getinstallxxx, Ubuntu downloads the software package from these sites to the local device and installs it.