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.
apt
And 'apt-get' is a tool similar to Red Hat yum
, which can resolve deb
package 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 -i
Manually 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 -s
Query details of installed packages.
dpkg -L
Query the location of installed packages in the system. (similar to rpm -ql)
dpkg -S
Query which software package a file belongs to in the system. (similar to rpm -qf)
dpkg -I
Query 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 -r
Uninstall the package. Not a complete uninstall, its configuration files still exist.
dpkg -P
Uninstall all (but still can't solve the problem of package dependencies)
dpkg -reconfigure
reconfigure