On Debian/Ubuntu servers I enable unattended-upgrades for the security pocket only, with automatic reboot disabled and a notification instead. Feature updates and major versions stay manual. The common failure is not the tool, it is forgetting that a kernel or libc update does nothing until the service or the machine restarts: needrestart (or checkrestart) tells you what still runs old code.
Also worth checking: apt-get -s upgrade weekly, so you see what is waiting.
What is your policy: fully automatic with reboots in a maintenance window, notify-only, or everything by hand? Any horror story with auto-updates?
Open-source agent that lists the versions exposed by a Linux host: https://github.com/AttackScout/attackscout-agent — I work on AttackScout.


People seem to love overcomplicating this subject but it’s not hard
APT based distros:
apt-get update apt-get upgrade -y rebootEL distros:
dnf update rebootProvisos:
Defences:
Benefits:
We’ve been doing this for years on hundreds of vms, using Centos Linux, Rocky and Debian distros. Problems caused by reboots are negligible and would have been a problem anyway. Problems caused by bad distro packages are rare - maybe once a year. (I don’t recall any on Debian, but have had the odd one on Rocky and CentOs before it)
Build bouncy systems. Don’t be scared of rebooting.
what a bad advise. there is https://wiki.debian.org/PeriodicUpdates for debian and https://docs.fedoraproject.org/en-US/quick-docs/autoupdates/ for fedora and you should use and configure these instead of cooking cron scripts yourself.
Those are great guides and absolutely valid, but my advice is solid too. I’ve been doing this for a long time and work with other clever admins who do the same.
There is always more than one way to do something in this world. That’s one of the strongest lessons you could learn.
many “clever admins” tend to overestimate their abilities and hack solutions together instead of just using the tool for the thing that does it the right way
deleted by creator