To override the configuration it is recommended to create an other APT configuration file fragment which overrides the shipped default value because updates to to shipped configuration file may conflict with the local changes blocking updating unattended-upgrades itself.
This does not work if you want to replace/unset the default shipped Origins-Pattern. The Unattended-Upgrade::Origins-Pattern in a different config file are always appended to the entries from /etc/apt/apt.conf.d/50unattended-upgrades. It is not possible to unset them partly for example. Is this by intention?
Example
The intention here is to remove/unset the entry "origin=Debian,codename=${distro_codename},label=Debian"; without the need to modify or delete the /etc/apt/apt.conf.d/50unattended-upgrades file (which should be prevented as mentioned in the README).
/etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Origins-Pattern {
// Codename based matching:
// This will follow the migration of a release through different
// archives (e.g. from testing to stable and later oldstable).
// Software will be the latest available for the named release,
// but the Debian release itself will not be automatically upgraded.
// "origin=Debian,codename=${distro_codename}-updates";
// "origin=Debian,codename=${distro_codename}-proposed-updates";
"origin=Debian,codename=${distro_codename},label=Debian";
"origin=Debian,codename=${distro_codename},label=Debian-Security";
"origin=Debian,codename=${distro_codename}-security,label=Debian-Security";
// Archive or Suite based matching:
// Note that this will silently match a different release after
// migration to the specified archive (e.g. testing becomes the
// new stable).
// "o=Debian,a=stable";
// "o=Debian,a=stable-updates";
// "o=Debian,a=proposed-updates";
// "o=Debian Backports,a=${distro_codename}-backports,l=Debian Backports";
};
This does not work if you want to replace/unset the default shipped
Origins-Pattern
. TheUnattended-Upgrade::Origins-Pattern
in a different config file are always appended to the entries from/etc/apt/apt.conf.d/50unattended-upgrades
. It is not possible to unset them partly for example. Is this by intention?Example
The intention here is to remove/unset the entry
"origin=Debian,codename=${distro_codename},label=Debian";
without the need to modify or delete the/etc/apt/apt.conf.d/50unattended-upgrades
file (which should be prevented as mentioned in the README)./etc/apt/apt.conf.d/50unattended-upgrades
/etc/apt/apt.conf.d/52unattended-upgrades-local
Result