Why do I need to restart when doing a RPM application update?

I noticed that when I’m updating flatpaks via gnome software I don’t need to restart the system to apply them, but to update RPMs I do. I understand why asking the user to reboot when doing a system update like kernel, DE, firmware etc, but why do I need to reboot to apply an RPM application update like a text editor or a web browser?

Your understanding is correct. There is no need to restart for most updates.

We need to know why this question came up? What are you seeing that prompts for the restart? Under what conditions?

I personally never see that even when a kernel update occurs (probably because my updates are automated). I just restart about once a week anyway.

In fact it has been more than 6 months since the system asked for a restart after an update. I was still running f33 then.

Well likely due to system related requirements that cannot be met without a reboot. If it is Silverblue you are using, anything layered will need a reboot to become active, it needs to pick the new root for the system.

1 Like

The prompt is only when updating via gnome software, when updating via command line I don’t need to reboot to apply them.

I just updated my system so I took this image from the internet as an example as I can’t take an actual screenshot of my system right now.

After that I reboot and go to this screen

image

I’m using Fedora 35 Workstation.

This topic has already been discussed somewhere. Sorry I don’t have a link. Maybe try to search here on Ask Fedora.
Summarizing. GNOME Software is not a DNF frontend. GNOME Software developers decided that rebooting the system to perform offline updates [1] is more safe than applying them while the system is running.

[1] indeed, if you look, it is not that the reboot of the system is needed because you have updated a package, but the updates are performed during the reboot.

1 Like

Gnome software uses packagekit which functions differently than dnf so I would suggest you do one of two things.

  1. Ignore it because it is not necessary in most instances.
  2. File a bug at https://bugzilla.redhat.com against packagekit for the unnecessary restart prompts.

@alciregi notes above that this was a design feature. I do not use (and absolutely hated) the offline update process introduced by packagekit so I have disabled and do not use it.

2 Likes

There is no need to file a bug. It is a GNOME software feature. And IMHO there is no need to hate anything. Power users don’t even need a graphical package manager. But normal people usually doesn’t care about updates. I think that GNOME software is more oriented to newbies or non IT people. So I think that automatic updates&reboot is perfectly fine from this point of view. You can disable such behavior, you can also uninstall gnome-software and packagekit if you think that aren’t useful to you.

1 Like

The currently running apps may use outdated vulnerable code loaded to memory before update.

1 Like

Yeah, but that wouldn’t be true for flatpaks too? So why I don’t need to restart when updating flatpaks? (I really don’t know how flatpak work so maybe that is not true for them)

Not really. Flatpaks don’t use system libraries. They run inside a container, a sandbox.

2 Likes

No it was not acceptable with what they did.

What I hated was the default config to do an offline update with every shutdown/restart and if you did not want that you had to remember to uncheck that box before you did the shutdown.

It delayed the shutdown and drastically increased the startup as the updates were downloaded during shutdown and applied during startup.

I seem to recall that changes have been made to that process but will absolutely refuse to use something that reminds me of the forced update process introduced by MS. When introduced in packagekit it did not allow the user to select “to do” when desired, but rather forced them to select “do not do” at shutdown.

Yes, the updates may include security fixes, but if that app is not running the restart is not necessary ever. Yes it is a good idea to restart after updates are applied. Forcing me to do the update during a restart or shutdown (or rather doing the update unless I say no) is not acceptable.

I haven’t used Workstation as my daily driver for awhile, but I seem to recollect that I could disable the automatic update feature of Gnome SW and that setting persisted across updates.

Same topic has been discussed before

And i think this restart is required because in most cases rpm apps use same dependency or same package for system also so updating a app could change that part of dependency which maybe required to run the os so it is safe to restart maybe that was the reason why gnome and fedora team implemented this in that way. But in some case i also thought that it is maybe over reacting for a restart so you can put a post in bugzila about this issue because most distros don’t ask for restart.

2 Likes

This has been discussed before as @frankjunior pointed out. I’m going to close this topic now.

1 Like