The system was installed 16 months ago on 2022-12-28. Created the following service:
3400g:~ # cat /mnt/@/etc/systemd/system/dup.service
[Unit]
Description=Distribution Upgrade
[Service]
Type=exec
ExecStart=/usr/bin/zypper -n dup
3400g:~ #
Started the service and got:
3400g:~ # journalctl -b -1 -u dup --directory /mnt/@/var/log/journal -g 'Pakete|Consumed'
Apr 01 17:40:02 twtest zypper[6900]: Installierte Pakete werden gelesen...
Apr 01 17:40:06 twtest zypper[6900]: Die folgenden 2058 Pakete werden aktualisiert:
Apr 01 17:40:06 twtest zypper[6900]: Die folgenden 6 Pakete werden die Architektur ändern:
Apr 01 17:40:06 twtest zypper[6900]: Die folgenden 851 NEUEN Pakete werden installiert:
Apr 01 17:40:06 twtest zypper[6900]: Die folgenden 303 Pakete werden GELÖSCHT:
Apr 01 17:40:06 twtest zypper[6900]: 2058 Pakete werden aktualisiert, 851 neue, 303 zu entfernen, 6 Architekturwechsel.
Apr 01 18:00:06 twtest systemd[1]: dup.service: Consumed 14min 28.195s CPU time.
3400g:~ #
2058 packages are updated, 851 new, 303 to be removed, 6 architecture changes. Again an extremely smooth experience. 
4 Likes
Users shy of creating a systemd service may try a transient unit instead. Changes needed are minimal and comparable to the sudo command:
systemd-run zypper --non-interactive dist-upgrade
Users may issue the command at any command line prompt. systemd-run
puts the job in the system slice and thus avoids the well-known risks of running the upgrade in the user slice. Upon startup the identifier of the unit is printed to the screen. Noninteractive mode may require some tweaking of zypper settings and repository priorities.
View the journal:
karl@3400g:~> journalctl -u run-u3081.service --identifier zypper
Mai 19 06:48:01 3400g zypper[3332]: Loading repository data...
Mai 19 06:48:01 3400g zypper[3332]: Reading installed packages...
Mai 19 06:48:01 3400g zypper[3332]: Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this co>
Mai 19 06:48:01 3400g zypper[3332]: Computing distribution upgrade...
Mai 19 06:48:02 3400g zypper[3332]: The following 8 packages are going to be upgraded:
Mai 19 06:48:02 3400g zypper[3332]: libvdpau_r600 libvdpau_radeonsi libvulkan_intel libvulkan_radeon Mesa-dri Mesa-gallium Mesa-libva Mesa-vulkan-device-select
Mai 19 06:48:02 3400g zypper[3332]: 8 packages to upgrade.
Mai 19 06:48:02 3400g zypper[3332]: Overall download size: 0 B. Already cached: 41.4 MiB. No additional space will be used or freed after the operation.
Mai 19 06:48:02 3400g zypper[3332]: Backend: classic_rpmtrans
Mai 19 06:48:02 3400g zypper[3332]: Continue? [y/n/v/...? shows all options] (y): y
Mai 19 06:48:05 3400g zypper[3332]: In cache Mesa-gallium-24.0.7-1699.378.pm.3.x86_64.rpm (1/8), 12.3 MiB
Mai 19 06:48:05 3400g zypper[3332]: In cache Mesa-vulkan-device-select-24.0.7-1699.378.pm.3.x86_64.rpm (2/8), 57.9 KiB
Mai 19 06:48:05 3400g zypper[3332]: In cache libvdpau_radeonsi-24.0.7-1699.378.pm.3.x86_64.rpm (3/8), 3.8 MiB
Mai 19 06:48:05 3400g zypper[3332]: In cache Mesa-dri-24.0.7-1699.378.pm.3.x86_64.rpm (4/8), 8.9 MiB
Mai 19 06:48:05 3400g zypper[3332]: In cache Mesa-libva-24.0.7-1699.378.pm.3.x86_64.rpm (5/8), 4.1 MiB
Mai 19 06:48:05 3400g zypper[3332]: In cache libvdpau_r600-24.0.7-1699.378.pm.3.x86_64.rpm (6/8), 3.8 MiB
Mai 19 06:48:05 3400g zypper[3332]: In cache libvulkan_intel-24.0.7-1699.378.pm.3.x86_64.rpm (7/8), 6.0 MiB
Mai 19 06:48:05 3400g zypper[3332]: In cache libvulkan_radeon-24.0.7-1699.378.pm.3.x86_64.rpm (8/8), 2.4 MiB
Mai 19 06:48:06 3400g zypper[3332]: Checking for file conflicts: [..done]
Mai 19 06:48:06 3400g zypper[3332]: (1/8) Installing: Mesa-gallium-24.0.7-1699.378.pm.3.x86_64 [....done]
Mai 19 06:48:06 3400g zypper[3332]: (2/8) Installing: Mesa-vulkan-device-select-24.0.7-1699.378.pm.3.x86_64 [..done]
Mai 19 06:48:06 3400g zypper[3332]: (3/8) Installing: libvdpau_radeonsi-24.0.7-1699.378.pm.3.x86_64 [...done]
Mai 19 06:48:07 3400g zypper[3332]: (4/8) Installing: Mesa-dri-24.0.7-1699.378.pm.3.x86_64 [....done]
Mai 19 06:48:07 3400g zypper[3332]: (5/8) Installing: Mesa-libva-24.0.7-1699.378.pm.3.x86_64 [...done]
Mai 19 06:48:07 3400g zypper[3332]: (6/8) Installing: libvdpau_r600-24.0.7-1699.378.pm.3.x86_64 [...done]
Mai 19 06:48:07 3400g zypper[3332]: (7/8) Installing: libvulkan_intel-24.0.7-1699.378.pm.3.x86_64 [...done]
Mai 19 06:48:08 3400g zypper[3332]: (8/8) Installing: libvulkan_radeon-24.0.7-1699.378.pm.3.x86_64 [..done]
Mai 19 06:48:08 3400g zypper[3332]: Running post-transaction scripts [...done]
Mai 19 06:48:11 3400g zypper[3332]: There are running programs which still use files and libraries deleted or updated by recent upgrades. They should be restarted to benefit from the latest updates. Run 'zypper ps -s' to list these pro>
Mai 19 06:48:11 3400g zypper[3332]:
karl@3400g:~>
1 Like