APT pinning priority and dpkg hold interaction across Debian releases
0 reputation · 16 Feb 2026, 19:20 UTC
Goal
Determine whether an APT pin priority defined in /etc/apt/preferences.d can override a dpkg hold flag when the same package version is available from multiple repositories during a distribution upgrade.
Constraints and uncertainty
APT evaluates repository pin priorities before selecting a candidate version, while dpkg independently enforces hold status on installed packages. Behavior is reported to differ between Debian 10 (buster) and Debian 12 (bookworm), particularly for automatic pinning of security updates, and conflicting preferences may cause dpkg to reject or prompt for resolution. Misconfigured priorities risk unintended removals or broken dependencies, so the exact precedence boundary between APT pinning and dpkg holds remains unclear without version-specific confirmation.
Does APT pin priority take precedence over dpkg hold status during cross-repository upgrades? Does the precedence change between Debian 10 and Debian 12? What happens when a pinned candidate conflicts with an active dpkg hold?