Detailed explanation of the use of dpkg command in Ubuntu system

  dpkg That is, package manager for Debian is a major package management tool in Debian and Debian-based systems , which can be used to install, build, uninstall, and manage  deb software packages in the format. The main and friendlier frontend to dpkg is aptitude. DPKG itself is completely controlled by command-line parameters, which contain only an action and zero or more options. Action arguments tell dpkg what to do, options control how actions behave in some way.
  
  'dpkg' is mainly used to install the 'deb' software package that has been downloaded locally, or to manage the installed software.

  aptAnd 'apt-get' is a tool similar to Red Hat yum, which can resolve debpackage dependencies by itself. Download and install software directly from a remote software repository. The apt command can refer to the Linux apt command


Detailed explanation of dpkg command #

   dpkg -iManually install the software package (this command does not solve the previous dependency problem of the software package), if you encounter a software dependency problem when installing a certain software package, you can use apt-get -f install to solve the dependency problem.
   
   dpkg --info "软件包名" --List the package name after unpacking the package.

   dpkg -l--List all packages in the current system. It can be used with the parameter less to view in split screen. (similar to rpm -qa)

   dpkg -l <package_name> Query package information
   
   dpkg -l |grep -i "软件包名" --check the packages associated with "package name" in the system.

   dpkg -sQuery details of installed packages.

   dpkg -LQuery the location of installed packages in the system. (similar to rpm -ql)

   dpkg -SQuery which software package a file belongs to in the system. (similar to rpm -qf)

   dpkg -IQuery the detailed information of the deb package, and check whether it needs to be installed after a package is downloaded locally (take a look).

   dpkg -rUninstall the package. Not a complete uninstall, its configuration files still exist.

   dpkg -PUninstall all (but still can't solve the problem of package dependencies)

   dpkg -reconfigurereconfigure

Guess you like

Origin blog.csdn.net/woshisunyizhen/article/details/130712530