When using the official third-party repository of mono in Debian, unattended Upgrades will not upgrade the mono packages unless you allow the origin. To do so, edit your /etc/apt/apt.conf.d/50unattended-upgrades , which may look like this:
Unattended-Upgrade::Origins-Pattern { "o=Debian,n=${distro_codename}"; "o=Debian,n=${distro_codename}-updates"; "o=Debian,n=${distro_codename}-proposed-updates"; "o=Debian,n=${distro_codename},l=Debian-Security"; };
To also update mono packages on Debian Stretch, add XamarinStretch as Origin:
Unattended-Upgrade::Origins-Pattern { "o=Debian,n=${distro_codename}"; "o=Debian,n=${distro_codename}-updates"; "o=Debian,n=${distro_codename}-proposed-updates"; "o=Debian,n=${distro_codename},l=Debian-Security"; "o=XamarinStretch"; };
If you use another Debian version or Distribution, like Jessie or Ubuntu, search for the file /var/lib/apt/lists/download.mono-project.com_repo_*_InRelease and check the “Origin: ” line and adjust the origin in the config file accordingly.
Repositories with empty Origin like packages.sury.org
If you find that the Origin of the packages in the repository is not given, then you can also tell unattended upgrade to select them based on the given site. For example, this works for the packages from sury.org:
"site=packages.sury.org";
Icinga repository
The packages.icinga.com Repository has the Origin “debian icinga-stretch”, so this is what you need to add to /etc/apt/apt.conf.d/50unattended-upgrades:
"o=debian icinga-${distro_codename}";
Test your changes
To test if it works, you can run unattended updates manually like this (as root or with sudo):
unattended-upgrade -d
If this made your day or you still have problems, just drop a comment.
Worked as announced. Thanks, that made my day 🙂
Comment by Vit — 17. December 2021 @ 16:13