Manage unattended upgrades on Linux servers
To ensure your system manages all patching, disable unattended‑upgrades.
To manage unattended upgrades:
-
Check whether unattended‑upgrades is enabled.
Run the following command:
systemctl status unattended-upgrades- Active (running): Unattended upgrades are enabled.
- Inactive (dead): Unattended upgrades are disabled.
Check the configuration file:
APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Unattended-Upgrade "1";If both values are
"1", unattended upgrades are enabled. -
Disable unattended‑upgrades. Remove the package:
sudo apt remove unattended-upgrades -
Confirm that unattended‑upgrades is disabled.
Run the following command:
systemctl status unattended-upgradesYou should see Inactive (dead) or a unit not found message.
