Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

systemd[1]: Starting Daily apt upgrade and clean activities...

982 views
Skip to first unread message

Lee

unread,
Feb 8, 2022, 2:50:06 PM2/8/22
to
Apparently the syslog message
systemd[1]: Starting Daily apt upgrade and clean activities...
is caused by systemd / apt-daily.timer - correct?

# sudo systemctl status apt-daily.timer
● apt-daily.timer - Daily apt download activities
Loaded: loaded (/lib/systemd/system/apt-daily.timer; enabled;
vendor preset: enabled)
Active: active (waiting) since Fri 2022-01-28 15:16:57 EST; 1
weeks 3 days ago
Trigger: Wed 2022-02-09 00:33:19 EST; 10h left
Triggers: ● apt-daily.service

I'm sure I don't want any automatic apt upgrade happening, but what
are the "clean activities"?

TIA
Lee

Greg Wooledge

unread,
Feb 8, 2022, 3:10:06 PM2/8/22
to
Exactly what you'd imagine.

apt-get update
apt-get upgrade
apt-get clean


For more detail, see /usr/lib/apt/apt.systemd.daily --

# APT::Periodic::Unattended-Upgrade "0";
# - Run the "unattended-upgrade" security upgrade script
# every n-days (0=disabled)
# Requires the package "unattended-upgrades" and will write
# a log in /var/log/unattended-upgrades
#
# APT::Periodic::AutocleanInterval "0";
# - Do "apt-get autoclean" every n-days (0=disable)
#
# APT::Periodic::CleanInterval "0";
# - Do "apt-get clean" every n-days (0=disable)

Dan Ritter

unread,
Feb 8, 2022, 3:20:05 PM2/8/22
to
"apt clean" removes unnecessary download packages.

My personal preference is to have upgrade packages downloaded
automatically but not installed, and to get a daily email message
from each box in my house with a list of what is ready. After I
do an upgrade, I also do a clean.

At work, the local repo syncs with Debian mirrors, then tells
the sysadmin team what's new. They push packages into each of
several tiers of machines: the "any time" machines which can, if
necessary, be rebooted mid-day; the "evening" machines which can
stop after people have gone home; the "weekend" machines which
need to wait for a maintenance window unless there is an
emergency.

-dsr-

David Wright

unread,
Feb 8, 2022, 4:20:05 PM2/8/22
to
You start with the line above:

> Loaded: loaded (/lib/systemd/system/apt-daily.timer; …

and check the service it provides:

$ tail -n 3 /lib/systemd/system/apt-daily.service
ExecStartPre=-/usr/lib/apt/apt-helper wait-online
ExecStart=/usr/lib/apt/apt.systemd.daily update

$

So look at:

$ head -n 6 /usr/lib/apt/apt.systemd.daily
#!/bin/sh
#set -e
#
# This file understands the following apt configuration variables:
# Values here are the default.
# Create /etc/apt/apt.conf.d/10periodic file to set your preference.
$

That file contains helpful comments and the scripts, but what runs
depends on /etc/apt/apt.conf.d/10periodic, or other apt configurations,
which I don't have set.

Presumably the installers "unattended upgrades" option plays
with this stuff.

(The heads and tails above are just to trim the post; you're
not expected to use them a priori.)

Cheers,
David.

ghe2001

unread,
Feb 8, 2022, 4:20:06 PM2/8/22
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256



> My personal preference is to have upgrade packages downloaded
> automatically but not installed,

I think apticron does that for me. And it tells me that everything's up to date if it is. I do an 'apt update' to be sure I have the latest news, and an 'apt upgrade' if necessary (that's where I find out just what's available), and everything's already there -- at least I think it is; the updating's real fast. Even when it's updating Firefox or the kernel.

I do the same via SSH for the other machines on the net.

--
Glenn English



-----BEGIN PGP SIGNATURE-----
Version: ProtonMail

wsBzBAEBCAAGBQJiAtnHACEJEJ/XhjGCrIwyFiEELKJzD0JScCVjQA2Xn9eG
MYKsjDJifwf/Zn3OZmXMAyEEsvQafCSq8Lr0/QTCI+6qL8DtPuEWlI/Gsom8
+8sOaugAews2gDLl/hU4mPU3e0JunNDrXN0Tpag2yneV6FRyYiBngeoLSmoU
JFbzQ7ujajlENYjAtlyiWQRKjpG64kRE6oIH9IStJzOxwDfy28g+EL1UjNeJ
I110qCBpkj5hMKEh8GN39w+KqmRvCZKuCf6xCh0MVSsgZ2XP3QFK7fMThqZ4
c2fGgAw5m/B8hdeQXnGabipf0bAszgpagaUukSErOEX5uhkAsbEh8KfY3Vaa
dQWhlVWyExxGYguRlyymB4X94Gn47b7O+35LxoYXSfva7boKrq1f/A==
=Dz+f
-----END PGP SIGNATURE-----

Andy Smith

unread,
Feb 9, 2022, 1:40:06 AM2/9/22
to
Hello,

On Tue, Feb 08, 2022 at 02:25:35PM -0500, Lee wrote:
> Apparently the syslog message
> systemd[1]: Starting Daily apt upgrade and clean activities...
> is caused by systemd / apt-daily.timer - correct?

No, that one is from apt-daily-upgrade.timer:

$ grep -r "upgrade and clean" /lib/systemd/
/lib/systemd/system/apt-daily-upgrade.timer:Description=Daily apt upgrade and clean activities
/lib/systemd/system/apt-daily-upgrade.service:Description=Daily apt upgrade and clean activities
$ systemctl cat apt-daily-upgrade
# /lib/systemd/system/apt-daily-upgrade.service
[Unit]
Description=Daily apt upgrade and clean activities
Documentation=man:apt(8)
ConditionACPower=true
After=apt-daily.service network.target network-online.target
systemd-networkd.servic>

[Service]
Type=oneshot
ExecStartPre=-/usr/lib/apt/apt-helper wait-online
ExecStart=/usr/lib/apt/apt.systemd.daily install
KillMode=process
TimeoutStopSec=900

> I'm sure I don't want any automatic apt upgrade happening, but what
> are the "clean activities"?

Upgrades only happen if you have allowed unattended-upgrades, so
don't be concerned by the description of the service saying
"upgrade".

"clean" refers to "apt-get clean" and "apt-get autoclean".

See the actual script /usr/lib/apt/apt.systemd.daily for the apt
configuration settings which would allow these things to happen and
control how often they happen.

Cheers,
Andy

--
https://bitfolk.com/ -- No-nonsense VPS hosting
0 new messages