System updates "apply after rebooting" vs dnf update

The “software updates” section of Settings allow us to apply system updates after reboot. I want to know how different is this from running sudo dnf update

I use this snapper configuration to create auto snapshots everytime i run a dnf transaction. However, using Discover’s/Fedora KDE’s built-in GUI update system does not invoke this and I don’t get newly created snapshots.

You can tell dnf to do offline updates that are applied when you reboot.
See Offline Command — dnf5 documentation for the details.

This is the same workflow used for upgrades from one fedora release to the next, which you may have used.

1 Like

I think Discover/Software-app is still using dnf4. There are different databases for that.

You could try to use dnf4 in general. If you change the dnf link to dnf4 you could achieve that.

1 Like

The main difference is just that the updates are run at a time when few system processes are running. I think it was around the time when dbus started becaming more popular that a few edge cases started showing up where things could break or lock up (particularly in the GUI) as dnf changed the files and libraries while the full system was running.

Doing the update on reboot just causes the changes to run at a time when fewer processes are active. The downside is that if the transaction fails, you will not be at an interactive command line where you can manually make adjustments and retry the update. But thankfully the dnf transactions rarely fail so that isn’t too much of a problem.

You can get the best of both worlds by manually changing your system to the multi-user target which will shut down many of the system processes (especially the GUI processes that tend to use dbus more) and then running dnf update from the command line. Use sudo systemctl isolate multi-user.target to shutdown your GUI and switch to the multi-user mode. (You might need to hit Ctrl+Atl+F2 after switching to multi-user mode to get the login prompt to show.)

1 Like

Ah! Makes sense. I ran dnf update --offline followed by dnf offline reboot. Now I can see the snapper snapshots being created.

I presume if i install dnf-snapper-plugin, the software/discover powered updates feature should also trigger new snapshot creation?

Thank you very much.