They offer different flash templates with latest features.
Login

Forgot password
Register
Back
Written by:
Alexio
Score: 23
votes: 25
Format: Article

 How to enable unattended software updates on Linux Mint


Installation of software updates are very important in every operating system. We can either configure the installation of package updates manually or automatically in Linux Mint. This tutorial explains you how to enable the installation of software package updates automatically in the Ubuntu-based editions of Linux Mint.

Open your terminal and run the update:

sudo apt-get update

Install the “unattended-upgrades” package:

sudo apt-get install unattended-upgrades

This is the package used to install the updated packages automatically.

The configuration files are located at /etc/apt/apt.conf.d

To configure the unattended-upgrades edit the /etc/apt/apt.conf.d/50unattended-upgrades file and make changes according to your need: 

// Automatically upgrade packages from these (origin, archive) pairs 

Unattended-Upgrade::Allowed-Origins { 

"${distro_id} ${distro_codename}-security"; 

// "${distro_id} ${distro_codename}-updates"; 

// "${distro_id} ${distro_codename}-proposed"; 

// "${distro_id} ${distro_codename}-backports"; 

}; 

Note : “ // “ is a comment line. So whatever follows by the comment line ( // ) cannot be evaluated.

To enable the updates simply remove the comment line ( // ).

If you dont want to install the software updates for certain packages, just add those package names in the Blacklist:

// List of packages to not update 

Unattended-Upgrade::Package-Blacklist { 

// "vim"; 

// "libc6"; 

// "libc6-dev"; 

// "libc6-i686"; 

}; 

The results of unattended-upgrades will be logged to /var/log/unattended-upgrades

To enable automatic updates, edit /etc/apt/apt.conf.d/10periodic and set the appropriate apt configuration options:

APT::Periodic::Update-Package-Lists "1"; 

APT::Periodic::Download-Upgradeable-Packages "0"; 

APT::Periodic::AutocleanInterval "30"; 

APT::Periodic::Unattended-Upgrade "1"; 

The above configuration updates the package list, downloads, and installs available upgrades every day.

The local download archive is cleaned every thirty days.

Note : Here the number represents the days.


Tags: update automatic unattended
Created: 3 years ago.
Last edited: 3 years ago.
Reviewed: 3 years ago.
Read 0 times.

Comments
6 months ago

undersound
For Mint 17.2 see https://forums.linuxmint.com/viewtopic.php?t=202715  
8 months ago

UsesMintDaily24
Very useful tutorial.

If this installs all updates regardless of level (1 - 5), is there a way to control that so only specific levels are installed?

On the same note, I assume the "distro" security updates are from Mint and would only include certain levels, correct?
 
11 months ago

Enkidu
Ok, I solved my problem on my own! This kind of unattended-upgrades is not what I need. So I wrote my own script upgrading my system after resume:

unattended-upgrades-alternative: http://enkidu.eu/uaalternative

It is a simple bash script, checking for updates a couple of times a day, executed after each resume.

Feel free to use it at your own risk. :)
 
11 months ago

Enkidu
Can someone please explain to me, how to enable ALL level 1, 2, 3 updates disregarding names or ppa ecc? So the same that I do when I press update in update manager?

So that if I installed something new from a new ppa or any other archiv is automatically included!?

Tnx!
 
1 year ago

TheOnlyMo
nice tutorial
In 17.1 you also have to add the Rows:
"Ubuntu trusty-security"; and
"Ubuntu trusty-updates";
into /etc/apt/apt.conf.d/50unattended-upgrades to get the ubuntu-updates, otherwise you'll just update the Mint-Packages
Personally I also love one option Unattended-Upgrade::InstallOnShutdown "true";
Just remove the //, so it's not a comment anymore, and the updates will be done, when the PC is shut down.
And I don't have to explain my mother every next day, how to update :-D
 
1 year ago

pulsatorius
I didn't have any etc/apt/apt.conf.d/10periodic so I created it. Was this the right move? Should it be included in the instructions?  
2 years ago

BenJetson
I got this working on my LM 17 system. Here's whats in my "/etc/apt/apt.conf.d/50unattended-upgrades" file:

http://paste.ubuntu.com/8218593/
 
2 years ago

drewkeller
I don't see a way to edit my comment. The format for allowed origins entry should be in the format "origin:suite" as shown in the _Release file (the way I posted it before got clobbered).  
2 years ago

drewkeller
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 ":" as shown in the release file (open the file to see).

So you might have a section like this (Linux Mint 16 Petra)....

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

Note that this doesn't care what level the update is.
 
3 years ago

windyweather
This doesn't work. After a couple of days I find the shield has an "i" in it and the updates were not installed. Something is left out for LM 14.

No Joy for automatic updates.
ww
 
3 years ago

windyweather
Minor issue I think.
I'm trying this on LM 14 and I don't find the 10periodic file.
Do I need to create that file?
Guess I'll create it with the contents you suggest.
ww
 
3 years ago

AshBaby
Thanks, very concise and clear.  
3 years ago

sujitnag
very impotent information  
3 years ago

Hammer459
Nice and clear tutorial  
3 years ago

telcnas
thanks for this nice info...... :)  

Other tutorials from Alexio