- Create a systemd service and a timer unit with the below contents
- The units must run with root so create the units under
/etc/systemd/system/
- Enable the timer only (
systemctl enable --now zypper-dup-download-only.timer
) - Use
zypper dup
whenever you ready to update, packages will be cached daily by the units.
Contents of zypper-dup-download-only.service:
[Unit]
Description=Download available updates
StartLimitBurst=2
StartLimitIntervalSec=30
[Service]
Type=oneshot
Restart=on-failure
ExecStartPre=/usr/bin/zypper ref
ExecStart=/usr/bin/zypper dup --download-only -y
RemainAfterExit=yes
[Install]
WantedBy=default.target
Contents of zypper-dup-download-only.timer:
[Unit]
Description=Download available rpm package updates daily
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target