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

 

 

 

Automatic Updates?

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
PDA123
Posts: 78
Joined: 2021-04-24 01:55
Been thanked: 1 time

Automatic Updates?

#1 Post by PDA123 »

How do I set Debian so that security and/or program updates are automatic? It would be best if I could be prompted to accept or decline the updates.

Thank you,

Peter

arzgi
Posts: 1183
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Automatic Updates?

#2 Post by arzgi »


reinob
Posts: 1189
Joined: 2014-06-30 11:42
Has thanked: 97 times
Been thanked: 45 times

Re: Automatic Updates?

#3 Post by reinob »

PDA123 wrote:How do I set Debian so that security and/or program updates are automatic? It would be best if I could be prompted to accept or decline the updates.
automatic and being prompted does not really go well together does it? :)

If it's a server, I recommend a cronjob running

Code: Select all

apt-get -qq -y update
apt-get -q --dry-run --assume-no --verbose-versions dist-upgrade
so you get an e-mail if there are pending updates. Then you do them at your convenience (maybe after checking with apt changelog, apt listbugs where appropriate, etc.)

PDA123
Posts: 78
Joined: 2021-04-24 01:55
Been thanked: 1 time

Re: Automatic Updates?

#4 Post by PDA123 »

The problem is I could study that stuff until I'm older and grayer but would never understand it.

I've moved from Ubuntu 18.04 to Debian and I'm running Debian 11 in a desktop configuration and not a server. Ubuntu let me know when updates for security and others were available. That's what I'd like to do...so I think.

mm3100
Posts: 336
Joined: 2020-10-21 21:39
Has thanked: 8 times
Been thanked: 13 times

Re: Automatic Updates?

#5 Post by mm3100 »

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.
Unattended-upgrades will check for updates by default, it depends on your DE how it will be notified. KDE for me would give notification if there were upgrades.

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2063
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 221 times

Re: Automatic Updates?

#6 Post by FreewheelinFrank »

In Mate you could try package-update-indicator, which depends on gnome-packagekit.

I'm not sure what is installed by default in Mate: if you just want to be notified of updates, apt-config-auto-update makes Apt check for updates every day. It just writes a config file .

What happens then is an existing Systemd timer triggers an Apt update, Packagekit monitors Apt and so is aware of updates, and package-update-indicator monitors Packagekit and alerts you to available updates with a pop-up and panel notification.

XFCE doesn't seem to do anything by default. I found a Genmon script and modified it for Debian, and also wrote a Conky script to notify of updates. Both need apt-config-auto-update or unattended-upgrades to work.

unattended-upgrades can be configured to automatically update security updates, all updates, or just to notify of updates. Gnome does this through Software/Synaptic; in XFCE it involves editing the config file AFAICS.

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2020
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 138 times
Been thanked: 204 times

Re: Automatic Updates?

#7 Post by Hallvor »

Do you expect us to know what desktop environment you are using?
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5343
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: Automatic Updates?

#8 Post by dilberts_left_nut »

PDA123 wrote:The problem is I could study that stuff until I'm older and grayer but would never understand it.

I've moved from Ubuntu 18.04 to Debian and I'm running Debian 11 in a desktop configuration and not a server. Ubuntu let me know when updates for security and others were available. That's what I'd like to do...so I think.
One might ask why you moved from ubuntu then?
AdrianTM wrote:There's no hacker in my grandma...

PDA123
Posts: 78
Joined: 2021-04-24 01:55
Been thanked: 1 time

Re: Automatic Updates?

#9 Post by PDA123 »

I'm using the Mate desktop.

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2020
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 138 times
Been thanked: 204 times

Re: Automatic Updates?

#10 Post by Hallvor »

I think this should do the trick: https://packages.debian.org/buster/pack ... -indicator (as stated above)

Code: Select all

# apt install package-update-indicator
Gnome and KDE have their own indicators.
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

sirfer
Posts: 32
Joined: 2013-05-15 23:13
Location: Auckland, New Zealand
Has thanked: 14 times
Been thanked: 2 times

Re: Automatic Updates?

#11 Post by sirfer »

FWIW i have a small script I run every time I turn my computer on...

Code: Select all

#!/bin/bash
apt update &&
apt dist-upgrade &&
apt autoremove --purge &&
apt autoclean 
...which sits in /sbin

Granted it's not automatic but I always have a terminal open by default (openbox + tint2) so login as root via su, type 'ud' and away you go.

If you want to have the script locally just have it in your home dir and type 'sh ud' as root in your username home directory.

Post Reply