Friday, October 30, 2015

Ubuntu 14 Updates

apt-get install cron-apt
apt-get install unattended-upgrades


Edit the /etc/apt/apt.conf.d/50unattended-upgrades file
Remove the // to uncomment a line


Uncomment some lines shown below,


// Automatically upgrade packages from these (origin:archive) pairs
Unattended-Upgrade::Allowed-Origins {
        "${distro_id}:${distro_codename}-security";
        "${distro_id}:${distro_codename}-updates";


// Do automatic removal of new unused dependencies after the upgrade
// (equivalent to apt-get autoremove)
Unattended-Upgrade::Remove-Unused-Dependencies "true";


// Automatically reboot *WITHOUT CONFIRMATION*
//  if the file /var/run/reboot-required is found after the upgrade
Unattended-Upgrade::Automatic-Reboot "true";


// If automatic reboot is enabled and needed, reboot at the specific
// time instead of immediately
//  Default: "now"
Unattended-Upgrade::Automatic-Reboot-Time "05:20";




Edit the /etc/apt/apt.conf.d/10periodic file to look like this,
APT::Periodic::Enable "1";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";


Verify that /etc/apt/apt.conf.d/20auto-upgrades is correct,
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";