Is there a way to system upgrade to F39 Beta after dnf5?

I did a manual opt-into dnf5 on Fedora 38. I knew the dnf4 and dnf5 used separate databases. So because dnf5 doesn’t have system-upgrade yet I knew I’d have to clean install to Beta 39 and accepted that.

I just wanted to ask, if there’s some trick way to still do a system upgrade from 38 to 39 Beta using the old dnf4 even though its DB has been idle on my machine a long time?

The dnf database is not strictly necessary. I.e. it is possible to a) install/remove/update packages using rpm directly, b) interchangeably use dnf and dnf5 on the same machine. The result of such actions is that dnf/dnf5 will not know why something was installed. This mostly matters for removal of packages (e.g. something was installed as a dependency and is subject to autoremoval, or was installed explicitly, etc.)

You can either use dnf system-upgrade and pay careful attention that it’s not removing some packages unexpectedly, or just do an “online” upgrade with tmux dnf5 distro-sync --releasever=39.

1 Like

Why the tmux on the last command? The tmux is there because you like it personally or is that doing a critical job?

Anyway, I went ahead and did

dnf4 system-upgrade --releasever=39 download

I can review what it actually downloaded first before running the reboot

Such distro updates sometimes cause the gnome-shell to fail. (I haven’t seen this recently, but it certainly was a thing in the past.) If gnome-shell fails, then the terminal emulator will fail too. Dnf nowadays also blocks signals, so the update would finish even if the terminal it was started from goes away, but it’s not great. In particular, it would be hard to know that it finished. So to guard against those problems, I would recommend running the upgrade under tmux (or equivalent).

tmux is there so that if something happens (eg terminal hangs, connection loss if remote system etc etc) the process will not be interrupted resulting in a broken installation that will take you quite sometime to manually fix (assuming you’re comfortable with that in the first place or in the case of remote that there’s KVM access). You can use screen instead if not familiar with tmux.

It generally a good idea to run dnf under tmux/screen if it’s doing an online operation that is expected to last long. Same logic applies to other similar operations beside dnf.

The following worked for me:

tmux -c 'sudo dnf5 distro-sync --releasever=39'

followed by reboot and sudo rpmconf -a.

1 Like