Created
June 19, 2023 20:00
-
-
Save Refalm/efaea50b1445f8417df0db662f456e60 to your computer and use it in GitHub Desktop.
Debian automatic updates
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
apt update && apt upgrade -y && apt autoremove -y && apt install -y unattended-upgrades && echo -e "APT::Periodic::Update-Package-Lists \"1\";\nAPT::Periodic::Unattended-Upgrade \"1\";\n" > /etc/apt/apt.conf.d/20auto-upgrades && echo -e "Dpkg::Options {\n\t\"--force-confdef\";\n\t\"--force-confold\";\n}\n" > /etc/apt/apt.conf.d/local && echo -e 'Unattended-Upgrade::Origins-Pattern {\n\t"origin=Debian,codename=${distro_codename}-updates";\n\t"origin=Debian,codename=${distro_codename},label=Debian";\n\t"origin=Debian,codename=${distro_codename},label=Debian-Security";\n\t"origin=Debian,codename=${distro_codename}-security,label=Debian-Security";\n};\n\nUnattended-Upgrade::Package-Blacklist {\n};\n\nUnattended-Upgrade::AutoFixInterruptedDpkg "true";\nUnattended-Upgrade::Remove-Unused-Kernel-Packages "true";\nUnattended-Upgrade::Remove-New-Unused-Dependencies "true";\nUnattended-Upgrade::Remove-Unused-Dependencies "true";\nUnattended-Upgrade::Automatic-Reboot "true";\nUnattended-Upgrade::Automatic-Reboot-WithUsers "true";' > /etc/apt/apt.conf.d/50unattended-upgrades && systemctl restart unattended-upgrades.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment