dpkg - Debian Package Manager
1. dpkg --version
Display dpkg version information.
显示 dpkg 的版本信息
strong@foreverstrong:~$ dpkg --version
Debian 'dpkg' package management program version 1.18.4 (amd64).
This is free software; see the GNU General Public License version 2 or later for copying conditions. There is NO warranty.
2. dpkg -?, --help
Display a brief help message.
strong@foreverstrong:~$ dpkg -?
strong@foreverstrong:~$ dpkg --help
3. dpkg -P package / dpkg --purge package
Purge an installed or already removed package.
删除软件包,清除配置信息
strong@foreverstrong:~$ sudo dpkg -P youdao-dict
4. dpkg -r package / dpkg --remove package
Remove an installed package.
删除软件包,保留配置信息
strong@foreverstrong:~$ sudo dpkg -r youdao-dict
5. dpkg -l package-name-pattern… / dpkg --list package-name-pattern…
List packages matching given pattern.
strong@foreverstrong:~$ dpkg -l youdao-dict
6. dpkg -L package-name… / dpkg --listfiles package-name…
List files installed to your system from package-name.
strong@foreverstrong:~$ dpkg -L youdao-dict
7. dpkg -i package-file... / dpkg --install package-file...
Install the package. If --recursive or -R option is specified, package-file must refer to a directory instead.