Instructions for using common parameters of Linux dpkg and dpkg-deb

Glossary

"dpkg" is the abbreviation of "Debian Packager". A package management system specially developed for "Debian" to facilitate the installation, update and removal of software. All "Linux" distributions derived from "Debian" will use "dpkg", such as "Ubuntu", "Knoppix", etc.

The difference between dpkg-deb and dpkg

  1. The dpkg-deb command is used to package, decompress and provide deb installation package information.
  2. The dpkg command is used to install and uninstall installation packages.
  3. Any parameters passed to dpkg-deb can be called through dpkg. What dpkg ultimately executes are dpkg-deb - parameters, such as the final dpkg -bexecution dekg-deb -bform. If you encounter dpkg execution failure, please use dpkg-deb. Order.

dpkg-deb command

Syntax format: dpkg-deb [parameter] [file]

Insert image description here
Reference example:

#将deb包解压到linuxcool文件夹下
dpkg-deb -x File.deb linuxcool
#将解压到extract文件夹中所有的内容重新打包为deb包
dpkg-deb -b extract File.deb
#提取主控信息和文件解压,是-e和-x的组合
dpkg-deb -R File.deb  linuxcool

dpkg command

dpkg -i--Manually install software packages. If you encounter software dependency problems when installing a certain software package, you can use apt-get -f install to solve the reliability problem. --List all
dpkg -lpackages in the current system. Yes Used with the parameter less in split-screen view
dpkg -l |grep -i "软件包名" – view the packages associated with the "package name" in the system.
dpkg -PUninstall them all (but it still cannot solve the dependency problem of the package).
dpkg -rUninstall the package. It is not a complete uninstall, it The configuration file still exists.
dpkg -i package.deb – If you encounter permission problems when installing the package, you need to add sudo.

Reference documents:
https://www.linuxcool.com/dpkg-deb
https://manpages.ubuntu.com/manpages/focal/en/man1/dpkg-deb.1.html
https://www.cnblogs.com /cxsy/p/8093879.html

Guess you like

Origin blog.csdn.net/xiao3404/article/details/131755585