Can Ubuntu Unattended Upgrades be configured to download only?

I'd like to configure Ubuntu unattended-upgrades package to only download updates but not apply them. Is this possible? I'm not seeing a way to do it on this page but they show something using cron that could probably be adapted to do it. Just wondering if the U.U. package does it somehow instead of reinventing it


Solution 1:

You'll have to:

  1. Configure /etc/apt/apt.conf.d/10periodic to --download-only, adding a line:

APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Download-Upgradeable-Packages "1";

NOTE: You can look to other option on file /usr/lib/apt/apt.systemd.daily (ubuntu 20.04)

  1. Configure **/etc/apt/apt.conf.d/50unattended-upgrades to disable unattended-upgrade, adding a line

APT::Periodic::Unattended-Upgrade "0";

However, I strongly recommend to, at least, unable automatic security updates, which means enabling unattended-upgrades only for security updates.