Automatic Updates..?

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
carlosdanger
Level 3
Level 3
Posts: 106
Joined: Mon Feb 24, 2014 11:39 am

Automatic Updates..?

Post by carlosdanger »

Hi,

I run Linux Mint 16 (Petra) on two Laptops. We are very happy, that Mint does a lot more stuff simpler and better then Ubuntu.

Is this also true for automatic updates? Almost every day an icon in the tray tells us, that there are new updates. We always do the same...open the window and press "install updates". Sometimes I look what is updated, but I have no clue in case it would be something harmful. I only activate Updates Level 1-3, so I hope we are safe. In any case, we always press "Install Updates". I mean, what should I do, ask everytime in the forum to be sure if the update is harmless ;)

In conclusion. Since I just press "Install Updates" like a monkey every day (and sometimes it would be best to install updates when they are available right away and not only when I see there are new updates), I would like Linux Mint to install EVERYTHING automatically. If something goes wrong the icon in the tray will probably tell me just that. The cherry on the top would be an email sent to me if something goes wrong.

Is there a simple way to activate this in Mint? I looked in the settings and used the forum search. No luck.

Cheers,
sb

User avatar
xenopeek
Level 24
Level 24
Posts: 24634
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Automatic Updates..?

Post by xenopeek »

You can use unattended-upgrades for that. There should be a tutorial here and on the Community site (and on other websites, as this works for all Debian/Ubuntu based distros). You can configure it to either do unattended upgrades only for security upgrades (recommended), or for all.
Image

carlosdanger
Level 3
Level 3
Posts: 106
Joined: Mon Feb 24, 2014 11:39 am

Re: Automatic Updates..?

Post by carlosdanger »

xenopeek wrote:You can use unattended-upgrades for that. There should be a tutorial here and on the Community site (and on other websites, as this works for all Debian/Ubuntu based distros). You can configure it to either do unattended upgrades only for security upgrades (recommended), or for all.
I tried one of those tutorials in the past but it wasn't identical from my system. Maybe the tutorial was for an older Linux Mint Version.

Still...automatic updates seems so basic and so essential for everyday Mint users and beginners...there should be a simpler way to activate automatic updates. Somewhere in the Update Manager or Settings there should be at least a checkbox to activate automatic updates.

carlosdanger
Level 3
Level 3
Posts: 106
Joined: Mon Feb 24, 2014 11:39 am

Re: Automatic Updates..?

Post by carlosdanger »

I tried this tutorial: http://community.linuxmint.com/tutorial/view/1217

I am supposed to edit this file: /etc/apt/apt.conf.d/10periodic

But it does not exist on my system.

Also I read that people activated unattended-updates but are still presented with Level 3 updates to install manually. I would like to activate automatic-updates for ALL Levels I selected in the update manager. Otherwise unattended-updates somehow fails its purpose.

User avatar
xenopeek
Level 24
Level 24
Posts: 24634
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Automatic Updates..?

Post by xenopeek »

carlosdanger wrote:I am supposed to edit this file: /etc/apt/apt.conf.d/10periodic

But it does not exist on my system.
... Create it?
Image

carlosdanger
Level 3
Level 3
Posts: 106
Joined: Mon Feb 24, 2014 11:39 am

Re: Automatic Updates..?

Post by carlosdanger »

xenopeek wrote:
carlosdanger wrote:I am supposed to edit this file: /etc/apt/apt.conf.d/10periodic

But it does not exist on my system.
... Create it?
I think it is missing for a reason. I didn't remove it so it was never there. It is there however on Ubuntu 13.10 on which Linux Mint 16 is based.

I assume it will be ignored by Mint anyways. Also I don't know the full content of the file...only the parts from the tutorial. Maybe creating it would really mess up my update cycle without me noticing it.

Does the file exist on your system?

User avatar
xenopeek
Level 24
Level 24
Posts: 24634
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Automatic Updates..?

Post by xenopeek »

Check my signature, not running Linux Mint right now :wink:

However, I did check what files the package installs: http://packages.ubuntu.com/saucy/all/un ... s/filelist. As you can see, it doesn't install that file, you create it yourself. On your Ubuntu system you could check if your package manager knows which program installed the file with command:

Code: Select all

dpkg -S /etc/apt/apt.conf.d/10periodic
In any case, like with some many configuration directories in /etc, all the files in the directory are processed. It's just a convenience for you, lowly human, to be able to split things into multiple files and give them meaningful names :wink: The two digit number in front of the name sets the order in which files are read and processed.
Image

DeMus

Re: Automatic Updates..?

Post by DeMus »

"I am supposed to edit this file: /etc/apt/apt.conf.d/10periodic"
Why do I see this in the tutorial:
To configure the unattended-upgrades edit the /etc/apt/apt.conf.d/50unattended-upgrades file and make changes according to your need

Another file is mentioned when I open the link. The contents of that file match the description in the tutorial.
Where did you see something about the 10periodic file?

carlosdanger
Level 3
Level 3
Posts: 106
Joined: Mon Feb 24, 2014 11:39 am

Re: Automatic Updates..?

Post by carlosdanger »

DeMus wrote:
"I am supposed to edit this file: /etc/apt/apt.conf.d/10periodic"
Why do I see this in the tutorial:
To configure the unattended-upgrades edit the /etc/apt/apt.conf.d/50unattended-upgrades file and make changes according to your need

Another file is mentioned when I open the link. The contents of that file match the description in the tutorial.
Where did you see something about the 10periodic file?
At the very end of the tutorial: http://community.linuxmint.com/tutorial/view/1217

User avatar
eanfrid
Level 7
Level 7
Posts: 1856
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Re: Automatic Updates..?

Post by eanfrid »

Also I read that people activated unattended-updates but are still presented with Level 3 updates to install manually. I would like to activate automatic-updates for ALL Levels I selected in the update manager. Otherwise unattended-updates somehow fails its purpose.
Aside from a good configuration of "unattended-upgrades", you must understand that only automated security updates are a rather safe choice on a desktop Linux system. Once more, Linux is not Windows:

- you get updates/upgrades as soon as they are available and useful, not buffered in a long awaited monthly update pack
- updates may require the installation or replacement of (new) dependencies packages, which can not be made automatically
- updates automatically and blindly applied could also remove packages that you or the system need otherwise for some other task
- some updates may require a not-yet-available previous update of another package
- some updates may imply a manual (re-)configuration of the package, because decisions have to be taken regarding new or removed features
- ...

Windows entices you to make no-brain-required tasks. Linux teaches you to put your brain back on.
Main desktop: Debian GNU/Linux Jessie 64bit - MATE
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
Safer than Dropbox

drewkeller
Level 1
Level 1
Posts: 17
Joined: Sun Jan 03, 2010 12:36 am

Re: Automatic Updates..?

Post by drewkeller »

I think it's pretty lame that Mint doesn't do auto-upgrade. Especially for us monkeys that just push the auto-upgrade button every day for levels 1-3.

The unattended-upgrades solution has no knowledge of Mint's upgrade levels. I think we really need a solution that can do upgrades based on the Mint upgrade levels.

The unattended-upgrades solution doesn't work out of the box, if you follow many of the tutorials that are out there because recent versions of Mint don't follow the same naming convention as Ubuntu. I posted how to get it working in Mint 16 a few minutes ago in that tutorial that was linked a few posts up. Here it is again...

For newer versions of Mint, you may need to change the allowed origins section. You can do a dry run, like this...

> sudo unattended-upgrade --dry-run
- Check the log in /var/log/unattended-upgrades/

To determine what origins you need, look in /var/lib/apt/lists/. Files that end in "_Release" are candidates for sources. Add desired update sources in the format "origin:suite" as shown in the release file (open the file to see).

Code: Select all

// Automatically upgrade packages from these (origin:archive) pairs
Unattended-Upgrade::Allowed-Origins {
	// security updates should be pretty safe to auto-update
	"${distro_id}:${distro_codename}-security";
	"Ubuntu:saucy-security";
	// the ones below are what most of the Mint levels 1-3 are, but this also includes 
	// levels 4-5 because unattended-upgrades has no knowledge of Mint's levels, so 
	// it's probably not really safe to auto-upgrade these.
	"${distro_id}:${distro_codename}-updates";
	"linuxmint:petra"
	"Ubuntu:saucy-updates";
//	"${distro_id}:${distro_codename}-proposed";
//	"${distro_id}:${distro_codename}-backports";
};

carlosdanger
Level 3
Level 3
Posts: 106
Joined: Mon Feb 24, 2014 11:39 am

Re: Automatic Updates..?

Post by carlosdanger »

drewkeller wrote:I think it's pretty lame that Mint doesn't do auto-upgrade. Especially for us monkeys that just push the auto-upgrade button every day for levels 1-3.

The unattended-upgrades solution has no knowledge of Mint's upgrade levels. I think we really need a solution that can do upgrades based on the Mint upgrade levels.

The unattended-upgrades solution doesn't work out of the box, if you follow many of the tutorials that are out there because recent versions of Mint don't follow the same naming convention as Ubuntu. I posted how to get it working in Mint 16 a few minutes ago in that tutorial that was linked a few posts up. Here it is again...

For newer versions of Mint, you may need to change the allowed origins section. You can do a dry run, like this...

> sudo unattended-upgrade --dry-run
- Check the log in /var/log/unattended-upgrades/

To determine what origins you need, look in /var/lib/apt/lists/. Files that end in "_Release" are candidates for sources. Add desired update sources in the format "origin:suite" as shown in the release file (open the file to see).

Code: Select all

// Automatically upgrade packages from these (origin:archive) pairs
Unattended-Upgrade::Allowed-Origins {
	// security updates should be pretty safe to auto-update
	"${distro_id}:${distro_codename}-security";
	"Ubuntu:saucy-security";
	// the ones below are what most of the Mint levels 1-3 are, but this also includes 
	// levels 4-5 because unattended-upgrades has no knowledge of Mint's levels, so 
	// it's probably not really safe to auto-upgrade these.
	"${distro_id}:${distro_codename}-updates";
	"linuxmint:petra"
	"Ubuntu:saucy-updates";
//	"${distro_id}:${distro_codename}-proposed";
//	"${distro_id}:${distro_codename}-backports";
};

I fully agree. It is very lame. Mint should be better then this and there is no technical reason not to offer this option somewhere in the settings. Most people just push the update button every day - so why not automate this?!

Even worse, the unattended upgrade tutorials do not work or work with side effects. Also most people just don't want or can't do this manually with every version of Mint. Especially since the unattended upgrade settings change between versions.

Most importantly, updates are very important. Why risk forcing people to manually edit some obscure file? This is just a magnet for mistakes. Also this crazyness clogs forums since people ask how to do it properly. 80% of all the energy in forums is just wasted on this and similar crap while important things fall through the cracks. We could do better.

Post Reply

Return to “Software & Applications”