Ubuntu 中 /etc/apt/preferences.d 目录的用途是什么?

Jue*_*gen 6 apt

当我将一些 apt 配置文件放入/etc/apt/preferences.dUbuntu 20 LTS 桌面时,它会被忽略(在 的输出中看不到apt-config dump)。
当我将相同的*.conf文件放入目录中时/etc/apt/apt.conf.d,它很荣幸(可以在 的输出中看到apt-config dump)。

/etc/apt/preferences.d那么Ubuntu 中该目录的用途是什么?

Jue*_*gen 7

根据man apt_preferences,该目录/etc/apt/preferences.d用于*.pref包含包首选项的文件,但首选项apt-config必须进入apt.conf.d/*.conf

apt-config忽略 中的错误*.conf文件/etc/apt/preferences.d,但apt-get install使用 发出警告
Ignoring file 'somefile.conf' in directory '/etc/apt/preferences.d/' as it has an invalid filename extension