Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Unattended Upgrades

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
cfb
Posts: 52
Joined: 2017-01-08 16:39
Been thanked: 5 times

Unattended Upgrades

#1 Post by cfb »

As far as I can tell, unattended upgrades have been implemented i Debian 9 (Stretch). I am not sure, if it has always been like that in Stretch or is the result of some upgrade along the way. I have a number of Debian 9 (xfce) installations and they all set up like the following.
In "/etc/apt/apt.conf.d/20auto-upgrades" I see these lines:

Code: Select all

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";.
and in "/etc/apt/apt.conf.d/50unattended-upgrades" this (commented out lines removed):

Code: Select all

Unattended-Upgrade::Origins-Pattern {
        "origin=Debian,codename=${distro_codename},label=Debian-Security";
};
As I understand it, these settings mean that "debian-security" upgrades are done automatically and unattended.
Can you confirm my findings?

cfb
Posts: 52
Joined: 2017-01-08 16:39
Been thanked: 5 times

Re: Unattended Upgrades

#2 Post by cfb »

From my OP, it may not have been entirely clear that what I meant to say was that unattended upgrades are now the default in Debian 9. It may have been mentioned somewhere, but I have not seen it.
You can turn it off with this command:

Code: Select all

# dpkg-reconfigure -plow unattended-upgrades
More info here: https://wiki.debian.org/UnattendedUpgrades

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Unattended Upgrades

#3 Post by Dai_trying »

I don't like to have my system updated without my knowledge and always change /etc/apt/apt.conf.d/20auto-upgrades to read

Code: Select all

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "0";.
That way apt will update the database and my updater will notify me of any available updates and I can decide to install them (or not).

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1388
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 65 times

Re: Unattended Upgrades

#4 Post by None1975 »

From Debian wiki
As of Debian 9 (Stretch) both the unattended-upgrades and apt-listchanges packages are installed by default and upgrades are enabled with the GNOME desktop.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

cfb
Posts: 52
Joined: 2017-01-08 16:39
Been thanked: 5 times

Re: Unattended Upgrades

#5 Post by cfb »

...upgrades are enabled with the GNOME desktop.
I had already read that in the wiki.
However, I am, as I wrote in the OP, using Xfce, and they are still enabled. That is what I find surprising.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Unattended Upgrades

#6 Post by debiman »

how did you install your current debian and how did you install xfce?

cfb
Posts: 52
Joined: 2017-01-08 16:39
Been thanked: 5 times

Re: Unattended Upgrades

#7 Post by cfb »

Following "debiman's" question, I installed Debian a couple of times in QEMU/KVM: A base Debian (without DE) and Debian with Xfce. In both cases unattended upgrades were not enabled. In fact, package "unattended-upgrades" was not even installed.

Then, clearly, I must have installed the package myself at some point in the past.

Digging through my APT history log files, I have now found out, how unattended upgrades got enabled on my systems:

A few months ago, I was trying out Docker containers, and following the installation instructions on the Docker site, I installed package "software-properties-common", which provides command "add-apt-repository". Well, package "software-properties-common" depends on package "python3-software-properties" which again recommends package "unattended-upgrades". So, package "unattended-upgrades" got installed and unattended upgrades of security fixes got enabled.

Package "software-properties-common" was probably unnecessary, as I believe it was only used for adding the Docker repository to "/etc/apt/sources.list". I might as well have done it by hand.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Unattended Upgrades

#8 Post by debiman »

install-recommends are tricky.
sometimes they make sense, but often they don't.
i keep them disabled.

Post Reply