My requirement is to enable/disable the unattended-upgrades
in Ubuntu all through non-interactively.
What I know is that we do have solutions like this or this but all of them suggests the same manual changes which I don't want.
So basically the command dpkg-reconfigure -plow unattended-upgrades
would prompt you an interactive window to select either Yes
or No
and I want to bypass this.
And I would only prefer these trivial solutions as my last resort if we don't have any better ways of doing this -
- Uninstall
unattended-upgrades
- Make string replacements in the file
/etc/apt/apt.conf.d/20auto-upgrades
to have the lineAPT::Periodic::Unattended-Upgrade "0";
instead of1
. And this may also require some kind of reload which I am not sure about.
Someone new to this topic and is curious what this is all about, youmay referthislink.