In Linux, Debian and its derivative operating systems such as Knoppix, Kali Linux, Ubuntu, and Mint rely on a variety of package management tools, Including but not limited to dpkg, apt, apt-get, aptitude, synaptic, tasksel, deselect, DPkg-deb, and DPkg-split. This article provides a brief introduction to these tools and focuses on the practical application of the dpkg command. dpkg is the main package manager in Debian and its derivative systems, allowing users to install, build, remove, and manage packages. aptitude is the main front-end interface of dpkg. Here are some common dpkg commands and their uses.
To install the dpkg package in Ubuntu, first download the ded file from the official Debian and Ubuntu package repositories, and then install it with i:
sudo dpkg -i 2048-qt_0.1.6-2+b2_amd64.deb
List the installed packages:
dpkg -l
Check whether the software package is installed, for example, Apache2.
dpkg -l apache2
Remove packages such as 048-qt from Ubuntu:
sudo dpkg -r 2048-qt
p instead of r can remove the package along with the configuration file.
To view the contents of a specific.DEDE package:
dpkg -c 2048-qt_0.1.6-2+b2_amd64.deb
To check whether the package is installed:
dpkg -s 2048-qt
List all the files installed by the package:
dpkg -L 2048-qt
Recursively install all.deb files in the specified directory and its subdirectories with the -R and --install options, such as:
sudo dpkg -R --install debpackages
To extract the contents of ded software packages, the software packages are not configured:
sudo dpkg --unpack 2048-qt_0.1.6-2+b2_amd64.deb
Configure packages that have been unpacked but not yet configured:
sudo dpkg --configure flashplugin-nonfree
Update software package information for system database:
sudo dpkg --update-avail package_name
Delete software package information:
sudo dpkg –-clear-avail
Automatically forget uninstalled and unavailable packages:
sudo dpkg --forget-old-unavail
Show dpkg license:
dpkg --licence
Show the dpkg version:
dpkg –version
See more dpkg help:
dpkg –help
These are the common practical applications of the dpkg command.