Skip to content

Instantly share code, notes, and snippets.

@mschmitt
Last active December 4, 2023 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mschmitt/c309457edeb4d891f8d1db1d24d62a25 to your computer and use it in GitHub Desktop.
Save mschmitt/c309457edeb4d891f8d1db1d24d62a25 to your computer and use it in GitHub Desktop.
Simulate Debian/Ubuntu unattended-upgrades
#!/bin/sh
echo "Clearing apt-periodic state"
rm /var/lib/apt/periodic/*
echo "apt-daily.service"
systemctl start apt-daily.service
echo "apt-daily-upgrade.service"
systemctl start apt-daily-upgrade.service
curl -O https://gist.githubusercontent.com/mschmitt/c309457edeb4d891f8d1db1d24d62a25/raw/cebf2f99c0f6d22839f043b44dfcbddfb0645a81/do-unattended-upgrades
sudo bash do-unattended-upgrades
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment