apt-daily timer/service — where did it come from?

10,314

The timers come from the apt package, so they’re installed by default. In a default installation, they only ensure that the indexes are updated every day; this is long-standing behaviour and is also supported by a cron job for systems without systemd.

Package upgrades, and the resulting restarts, only happen if unattended-upgrades is installed, and follow that package’s configuration.

See the relevant section of the Debian Reference for details.

Share:
10,314
setevoy
Author by

setevoy

Updated on September 18, 2022

Comments

  • setevoy
    setevoy over 1 year

    We are running Debian 9 and today faced the issue that the Redis server (on a couple of instances) was restarted.

    Checking the logs, I found two unknown services — apt-daily and apt-daily-upgrade — both added to the systemd timers:

    root@main:/home/user# systemctl list-timers
    NEXT                         LEFT          LAST                         PASSED       UNIT                         ACTIVATES
    ...
    Tue 2018-06-19 11:50:11 UTC  4h 6min left  Tue 2018-06-19 05:03:10 UTC  2h 40min ago apt-daily.timer              apt-daily.service
    Wed 2018-06-20 06:09:32 UTC  22h left      Tue 2018-06-19 06:41:51 UTC  1h 2min ago  apt-daily-upgrade.timer      apt-daily-upgrade.service
    

    I can not find any information about those two using apropos and Google (although the apt-daily.service file has a Documentation=man:apt(8) string — but there is nothing about apt-daily).

    Does anybody know what’s happening here? How can such auto-upgrades be enabled by default?

    P.S. I also have Debian 8 — nothing similar there.

  • setevoy
    setevoy almost 6 years
    Thanks, indeed - all servers have the unattended-upgrades installed, and all have APT::Periodic::Unattended-Upgrade "1" in its /etc/apt/apt.conf.d/20auto-upgrades configs.
  • setevoy
    setevoy almost 6 years
    Althought... I just started Debian 9 from ISO and it haven't unattended-upgrades installed, but have apt-daily-upgrade.timer activated...
  • Stephen Kitt
    Stephen Kitt almost 6 years
    @setenvoy the timer is activated, but the service it starts doesn’t upgrade any package if unattended-upgrades isn’t installed.