Answers:
不幸的是,apt-config dump
没有列出您要查找的dpkg选项。man dpkg
帮助我找到了该命令,该命令--force-help
更特定于force
您感兴趣的特定dpkg 选项,但没有完整的选项列表:
$ dpkg --force-help
dpkg forcing options - control behaviour when problems found:
warn but continue: --force-<thing>,<thing>,...
stop with error: --refuse-<thing>,<thing>,... | --no-force-<thing>,...
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
将列出的内容Dpkg::Options
,但前提是必须在中设置一些内容/etc/apt/apt.conf.d/
。Sa askubuntu.com/a/104912/399010
简短答案:
dpkg --force-help
我不同意接受的答案。尽管apt-config dump可帮助查看一些当前启用的选项-其中许多通常对于简单的apt操作很有用-但它并没有显示dpkg操作的所有选项,即“强制”选项。原始问题参考。要查看默认情况下启用了这些附加选项中的哪些选项,以及仅应在有充分知识的用户完全必要时才更改哪些选项,必须使用(由CLI提供)提供的帮助dpkg --force-help
。dpkg的手册页在描述--force-*things*
该dpkg
命令标志的部分下简要说明了该标志的输出。该手册页也可以在线查看:http
:
//man7.org/linux/man-pages/man1/dpkg.1.html https://linux.die.net/man/1/dpkg
(这些只是几个位置)。
--force-*things*
节),但是都没有显示OP要求的当前设置值。