14 July 2015

Ubuntu: Automatically Update

  1. Install Ubuntu first (see older post)
  2. Install the unattended updates:
    sudo apt-get install unattended-upgrades
  3. Edit the config (see official docs)
    sudo vi /etc/apt/apt.conf.d/50unattended-upgrades
    e.g. uncomment: updates; Remove-Unused-Dependencies; Automatic-Reboot-Time
  4. Edit the apt config for periodic checks
    sudo vi /etc/apt/apt.conf.d/10periodic
    APT::Periodic::Update-Package-Lists "1";
    APT::Periodic::Download-Upgradeable-Packages "1";
    APT::Periodic::AutocleanInterval "7";
    APT::Periodic::Unattended-Upgrade "1";
  5. If you want to run it straight away:
    sudo unattended-upgrade -d

No comments:

Post a Comment