to enable automatic updates install:

$ apt install unattended-upgrades

check and uncomment in the config file as needed, well documented inside the same config file /etc/apt/apt.conf.d/50unattended-upgrades:

$ cat /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Origins-Pattern {
"o=Raspbian,n=jessie,l=Raspbian-Security";
};
Unattended-Upgrade::MinimalSteps "true";
Unattended-Upgrade::InstallOnShutdown "true";
Acquire::http::Dl-Limit "300";
$ cat /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Origins-Pattern {
	"o=Ubuntu,a=xenial-security";
	"o=Ubuntu,a=xenial-updates";
	"o=Ubuntu,a=xenial";
	"o=Canonical,a=xenial";
	"o=linuxmint,n=serena";
};
Unattended-Upgrade::MinimalSteps "true";
Unattended-Upgrade::InstallOnShutdown "true";
Acquire::http::Dl-Limit "300";

edit the config file:

$ vim /etc/apt/apt.conf.d/10periodic
# update the package list
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";

# once a day
APT::Periodic::Unattended-Upgrade "1";

check if its working:

$ sudo unattended-upgrades --dry-run
$ tail /var/log/unattended-upgrades/unattended-upgrades.log

sources:

https://community.linuxmint.com/tutorial/view/1217

http://www.faqforge.com/linux/how-to-enable-auto-updates-in-ubuntu/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s