[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I permanently disable unattended downloads of software/security updates?



Greg Wooledge writes:

On Wed, Jun 02, 2021 at 07:33:32PM +0300, Reco wrote:
> 	Hi.
>
> On Wed, Jun 02, 2021 at 06:27:45PM +0200, Stella Ashburne wrote:
> > Output of systemctl list-timers

[...]

> > 6 timers listed.
> > Pass --all to see loaded but inactive timers, too.
>
> The most important parts of "systemctl list-timers" (your problem
> considered) are UNIT and ACTIVATES columns, and your result lacks them
> for some reason.

The designers of systemctl made some odd choices.  They drop you into a
weird interactive mode by default, and expect you to be willing and able
to scroll around to see the fields of this report.  Worst of all is that
you may not even *know* that you're supposed to do this.

[...]

to work, you need to redirect or pipe systemctl's output so that it isn't
going to a terminal.

systemctl list-timers | cat

Of course, this is still ugly as sin, because the designers of systemctl
don't understand that terminals are 80 characters wide, always and forever.
They just dump a bunch of longer-than-140-character lines and let them
wrap as they will.  Well, at least the information is there, even if it's
hard to read.

I have added the following aliases to all my systems:

	alias systemctl='systemctl -l --no-pager'
	alias journalctl='journalctl --no-pager'

But of course, I like that `cat` trick for systems which I do not own.
Much easier than remembering that it was `--no-pager` :)

[...]

Anyway, I suspect that the OP might find some useful information from
this command:

systemctl list-timers | grep apt

As far as I can tell, these ultimately lead to /usr/lib/apt/apt.systemd.daily which in turn claims to honor `APT::Periodic::Enable "1";` from /etc/apt/apt.conf.d.

Still it is worth checking the logs from the systemd timers, e.g.:

journalctl --no-pager -u apt-daily-upgrade.service
journalctl --no-pager -u apt-daily.service

It is also possible that there might be systemd user timers?

systemctl --user --no-pager -l list-timers

Here, the outputs are as follows:

~~~
# journalctl -u apt-daily-upgrade.service
-- Logs begin at Wed 2021-06-02 12:24:45 CEST, end at Wed 2021-06-02 20:47:39 CEST. -- Jun 02 12:24:55 masysma-18 systemd[1]: Starting Daily apt upgrade and clean activities...
Jun 02 12:24:56 masysma-18 systemd[1]: apt-daily-upgrade.service: Succeeded.
Jun 02 12:24:56 masysma-18 systemd[1]: Started Daily apt upgrade and clean activities.

# journalctl -u apt-daily.service
-- Logs begin at Wed 2021-06-02 12:24:45 CEST, end at Wed 2021-06-02 20:54:02 CEST. -- Jun 02 12:24:55 masysma-18 systemd[1]: Starting Daily apt download activities...
Jun 02 12:24:55 masysma-18 systemd[1]: apt-daily.service: Succeeded.
Jun 02 12:24:55 masysma-18 systemd[1]: Started Daily apt download activities.

$ systemctl --user --no-pager -l list-timers
0 timers listed.
Pass --all to see loaded but inactive timers, too.
~~~

I do not believe to have observed the automatic download behaviour the OP sees despite the timers obviously being active and the script running. From the timings (between start and completion of the `apt.systemd.daily`) it seems to not do anything out of the box.

I am leaning towards the "DE explanation" -- that the upgrades are not caused by APT's own mechanisms but rather triggered by some DE through opaque means not visible in cron or systemd timers. I am not sure how I would go about identifying the cause there, except for checking the GUI configuration that all related options are turned off?

HTH
Linux-Fan

öö

Attachment: pgpLeClWkhoIo.pgp
Description: PGP signature


Reply to: