Created
May 16, 2019 22:05
-
-
Save portableant/ba96623407b61f435ffe789952a60708 to your computer and use it in GitHub Desktop.
Unattended Ubuntu upgrade set up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su - | |
apt install unattended-upgrades | |
nano /etc/apt/apt.conf.d/50unattended-upgrades | |
Uncomment or change to the below: | |
"${distro_id}:${distro_codename}-updates"; | |
Unattended-Upgrade::Mail "itoffice@fitzmuseum.cam.ac.uk"; | |
Unattended-Upgrade::MailOnlyOnError "true"; | |
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true"; | |
Unattended-Upgrade::Remove-Unused-Dependencies "true"; | |
Unattended-Upgrade::Automatic-Reboot "true"; | |
Unattended-Upgrade::Automatic-Reboot-Time "02:00"; | |
Ctrl + x and save file | |
nano /etc/apt/apt.conf.d/20auto-upgrades | |
Add: | |
APT::Periodic::Update-Package-Lists "1"; | |
APT::Periodic::Download-Upgradeable-Packages "1"; | |
APT::Periodic::AutocleanInterval "7"; | |
APT::Periodic::Unattended-Upgrade "1"; | |
ctrl + x and save file | |
Check it works | |
unattended-upgrades --dry-run --debug | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment