如何显示所有apt-get Dpkg :: Options及其当前值?

apt-get -o Dpkg::Options::="--force-confnew" 

 apt-get -o Dpkg::Options::="--force-confold" 

还有很多。

如何获取所有Dpkg::Options及其当前设置值的列表?

不幸的是,“apt-config dump”没有列出您正在寻找的dpkg选项。 “man dpkg”帮助我找到了这个命令“–force-help”,它更具体地针对你感兴趣的特定dpkg“force”选项,但不是一个全面的选项列表:

 $ dpkg --force-help dpkg forcing options - control behaviour when problems found: warn but continue: --force-,,... stop with error: --refuse-,,... | --no-force-,... Forcing things: [!] all Set all force options [*] downgrade Replace a package with a lower version configure-any Configure any package which may help this one hold Process incidental packages even when on hold not-root Try to (de)install things even when not root bad-path PATH is missing important programs, problems likely bad-verify Install a package even if it fails authenticity check bad-version Process even packages with wrong versions overwrite Overwrite a file from one package with another overwrite-diverted Overwrite a diverted file with an undiverted version [!] overwrite-dir Overwrite one package's directory with another's file [!] unsafe-io Do not perform safe I/O operations when unpacking [!] confnew Always use the new config files, don't prompt [!] confold Always use the old config files, don't prompt [!] confdef Use the default option for new config files if one is available, don't prompt. If no default can be found, you will be prompted unless one of the confold or confnew options is also given [!] confmiss Always install missing config files [!] confask Offer to replace config files with no new versions [!] architecture Process even packages with wrong or no architecture [!] breaks Install even if it would break another package [!] conflicts Allow installation of conflicting packages [!] depends Turn all dependency problems into warnings [!] depends-version Turn dependency version problems into warnings [!] remove-reinstreq Remove packages which require installation [!] remove-essential Remove an essential package WARNING - use of options marked [!] can seriously damage your installation. Forcing options marked [*] are enabled by default. 

可以使用。

 apt-config dump