Often multiple reboot for system updates necessary?

I’m using Fedora Linux version 44 (details see below).

Why are some system updates only visible in Discover after the installation of the previous system update and a reboot? This forces me to install update - reboot - check and install more updates - reboot … Wouldn’t it be possible to first install all updates and then reboot just once?

Background info:
I install my updates via the Discover software. Some system updates require a restart of my computer (and as I often have many open windows for many different tasks in different workspaces, which makes it difficult recreate this working environment after a restart) I sometimes wait several days or a week until I do the restart for the updates.

Before I close all my application windows and do the reboot, I check in Discover for other updates and usually there are none - so everything looks fine.
However, directly after rebooting and installing the last system updates, Discover often shows me further system updates which sometimes again require a reboot.

So I wonder if there is a way to avoid this multiple install / reboot … iteration, or if this can not be avoided, because maybe the latest updates requires a certain system version to be installed.


Operating System: Fedora Linux 44
KDE Plasma Version: 6.7.5
KDE Frameworks Version: 6.31.0
Qt Version: 6.11.2
Kernel Version: 7.2.11-200.fc44.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 32 GiB of RAM (31.3 GiB usable)
Graphics Processor: AMD Radeon RX 550 / 550 Series
Product Name: B550 Pro4

Here is how I update, consider this as a workaround:

Switch to console or use a terminal:

sudo dnf update --refresh 
flatpak update

I reboot once a week.

If you want to be really paranoid, the safest way to update is to reboot. But I’ve been doing update without reboot for many years and don’t think I’ve ever had a problem with it. I only reboot for a major update like libc, or a big kde update. After installing a kernel update it won’t have any effect until reboot.
So yes, the officially recommended procedure is reboot after any update, but it’s hardly ever actually necessary.

sudo dnf update --refresh

@nbecker
Thank you very much. I’m not rebooting after every system update.
My question is just about those system updates for which Discover tells me that a reboot is necessary to install the update.

@augenauf / @pg-tips thank you very much for your quick reply!

Do you think that when using the terminal, I could install all pending updates at once (unlike in Discover)?

Yes, I would expect so when using --refresh.

I’m not sure how aggressively the Discover backend (PackageKit-based interface to DNF5) refreshes before performing an update. So it could be that it doesn’t find the newest updates, and you only see those when you reboot.

thank you very much - a first try looks promising.

While Discover shows me no new updates at all, the terminal command offers an impressive list of packages to update. :slight_smile:

I might add I have 2 remote servers that run dnf-automatic to automatically always install updates and never reboot (except power fail) and I’ve never seen a problem.

Interesting… does that mean that the terminal command will never ask me to reboot and it will still work?
(Because in Discover it seems that the installation files of those updates have been downloaded, but the real installation process only seems to start after the reboot)

dnf does not ask you to reboot.

needs-restarting

lets you perform a check

Needs-restarting does not notice a kernel install only services that need restarting last I checked.

does that mean that anytime I see I’m installing something with “kernel” in its name, I should do a restart afterwards?

Yes otherwise the new kernel will not be used.

I just did some testing.

Running sudo dnf needs-restarting with no options does report that the kernel changed and a reboot is needed.

But if you add the --services or --processes options then the command reports nothing. Which is what I have been running for years and hence why I believed that the kernel install was not reported.

In the dnf4 version you could check for kernel and services in one command.

Now I know I’ll have to update my linux-update tool to run both versions of the command:

sudo dnf needs-restarting --json
sudo dnf needs-restarting --services --json

You learn something new every day!

The command “tracer” from the python3-tracer rpm tells you which services need to be restarted. And it also tells you if a reboot is needed.