4

I can't find what is the difference between these 2 files.

What does apt-daily.timer and apt-daily-upgrade.timer trigger?

My guess is that:

  • apt-daily.timer trigger apt update

And

  • apt-daily-upgrade.timer trigger apt -y upgrade

but I can't find it written anywhere clearly in these terms.

Per Lundberg
  • 161
  • 7
Angel115
  • 250

2 Answers2

3

Documented on Debian:

  • Used for downloads: /lib/systemd/system/apt-daily.timer.
  • Used for upgrades: /lib/systemd/system/apt-daily-upgrade.timer

The timers control the apt-daily.service and apt-daily-upgrade.service. The first execute /usr/lib/apt/apt.systemd.daily script with update argument, the second will execute /usr/lib/apt/apt.systemd.daily with install argument.

GAD3R
  • 3,507
1

You have to compare their filecontents locally or online:

https://salsa.debian.org/apt-team/apt/-/blob/main/debian/apt-daily.timer :

Description=Daily apt download activities

https://salsa.debian.org/apt-team/apt/-/blob/main/debian/apt-daily-upgrade.timer :

Description=Daily apt upgrade and clean activities

Both trigger the apt.systemd.daily script - the first runs update, the second runs install (using unattended-upgrade script).

N0rbert
  • 99,918
  • Why is there no Unit= in the timer file corresponding to the service file that its suppose to run? Where is the mapping? – Hussain Nagri Jul 22 '21 at 05:19
  • https://salsa.debian.org/apt-team/apt/-/blob/main/debian/apt-daily.service and https://salsa.debian.org/apt-team/apt/-/blob/main/debian/apt-daily-upgrade.service – N0rbert Jul 22 '21 at 06:35
  • @HussainNagri a .timer unit has an implicit dependency on the corresponding .service unit of the same name. – Remember Monica Aug 25 '22 at 02:17