Newcomers are frequently puzzled by the subtleties of Tumbleweed upgrade. Unfortunately, the vendor defaults of zypper dist-upgrade
are a source of never-ending surprises. Following the recommendations below in a coherent and consistent manner may help in reducing noisy discussions.
-
When updating, zypper is an expert, while the user is an amateur. Thus users may want to allow anything by adding the options
--allow-arch-change --allow-downgrade --allow-name-change --allow-vendor-change
. -
Enable automatic refresh of the repositories by running
zypper modifyrepo --refresh -all
. Changes will be stored on disk. -
Always perform a dry run first by adding option
--download-only
. Recommended alias:
erlangen:~ # type dupt
dupt is aliased to `zypper --non-interactive dist-upgrade --allow-arch-change --allow-downgrade --allow-name-change --allow-vendor-change --no-recommends --download-only'
erlangen:~ #
Invoke alias:
erlangen:~ # dupt
Loading repository data...
Reading installed packages...
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 command.
Computing distribution upgrade...
The following package is going to be upgraded:
libx265-215
1 package to upgrade.
Package download size:
| 1.3 MiB overall package size
0 B | - 1.3 MiB already in cache
Download only.
Backend: classic_rpmtrans --download-only
Continue? [y/n/v/...? shows all options] (y): y
In cache libx265-215-4.1-1699.2.pm.1.x86_64.rpm (1/1), 1.3 MiB
erlangen:~ #
- When installing always run the command in the system slice by prepending
systemd-run
and optionallybash -c
. Recommended alias:
erlangen:~ # type dupsr
dupsr is aliased to `systemd-run /usr/bin/bash -c "LANG=en_GB.UTF-8 ZYPP_PCK_PRELOAD=1 zypper --non-interactive dist-upgrade --allow-arch-change --allow-downgrade --allow-name-change --allow-vendor-change --no-recommends"'
erlangen:~ #
Invoke alias:
erlangen:~ # dupsr
Running as unit: run-p187576-i187577.service; invocation ID: 071dac2f28ed4058a073ae8ea3b3da19
erlangen:~ #
Check Journal:
erlangen:~ # journalctl -u run-p187576-i187577.service --no-hostname --no-pager
Apr 12 11:01:23 systemd[1]: Started [systemd-run] /usr/bin/bash -c "LANG=en_GB.UTF-8 ZYPP_PCK_PRELOAD=1 zypper --non-interactive dist-upgrade --allow-arch-change --allow-downgrade --allow-name-change --allow-vendor-change --no-recommends".
Apr 12 11:01:24 bash[187577]: Loading repository data...
Apr 12 11:01:24 bash[187577]: Reading installed packages...
Apr 12 11:01:24 bash[187577]: 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 command.
Apr 12 11:01:24 bash[187577]: Computing distribution upgrade...
Apr 12 11:01:25 bash[187577]: The following package is going to be upgraded:
Apr 12 11:01:25 bash[187577]: libx265-215
Apr 12 11:01:25 bash[187577]: 1 package to upgrade.
Apr 12 11:01:25 bash[187577]: Package download size:
Apr 12 11:01:25 bash[187577]: | 1.3 MiB overall package size
Apr 12 11:01:25 bash[187577]: 0 B | - 1.3 MiB already in cache
Apr 12 11:01:25 bash[187577]: Package install size change:
Apr 12 11:01:25 bash[187577]: | 16.2 MiB required by packages that will be installed
Apr 12 11:01:25 bash[187577]: 0 B | - 16.2 MiB released by packages that will be removed
Apr 12 11:01:25 bash[187577]: Backend: classic_rpmtrans
Apr 12 11:01:25 bash[187577]: Continue? [y/n/v/...? shows all options] (y): y
Apr 12 11:01:27 bash[187577]: In cache libx265-215-4.1-1699.2.pm.1.x86_64.rpm (1/1), 1.3 MiB
Apr 12 11:01:27 bash[187577]: Checking for file conflicts: [..done]
Apr 12 11:01:27 [RPM][189059]: Transaction ID 67fa2be7 started
Apr 12 11:01:27 [RPM][189059]: erase libx265-215-4.1-1699.1.pm.1.x86_64: success
Apr 12 11:01:27 [RPM][189059]: install libx265-215-4.1-1699.2.pm.1.x86_64: success
Apr 12 11:01:27 [RPM][189059]: erase libx265-215-4.1-1699.1.pm.1.x86_64: success
Apr 12 11:01:27 [RPM][189059]: install libx265-215-4.1-1699.2.pm.1.x86_64: success
Apr 12 11:01:27 [RPM][189059]: Transaction ID 67fa2be7 finished: 0
Apr 12 11:01:28 bash[187577]: (1/1) Installing: libx265-215-4.1-1699.2.pm.1.x86_64 [...done]
Apr 12 11:01:28 bash[187577]: Running post-transaction scripts [...done]
Apr 12 11:01:30 bash[187577]: 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 programs.
Apr 12 11:01:30 bash[187577]:
Apr 12 11:01:30 systemd[1]: run-p187576-i187577.service: Deactivated successfully.
Apr 12 11:01:30 systemd[1]: run-p187576-i187577.service: Consumed 3.948s CPU time.
erlangen:~ #