Updates that require reboot

How often do updates have to do a restart? I’ve found that putting my laptop to sleep overnight is not very usefull as the next day I have to do a restart it anyway to install updates. Is this indeed a daily or almost daily restart thing? Is it possible to reduce down time and have Fedora do updates and shutdown as a daily routine? Is this a timezone issue and is my Western European schedule out of sync with the Fedora system updates?

Personally I update weekly, unless I hear of a security issue I care about, which is rare.

Since there is almost always a new kernel once a week I will reboot.
The reboot also has the advantage that any running services also restart with updated libraries etc.

often it’s as simple as restarting some services and programs to ensure that updated libraries are used.
e.g

$ sudo lsof -n  | grep -w DEL |grep '/usr/lib'
gnome-sof   3178                           xxx  DEL       REG               0,36             35535180 /usr/lib64/libflatpak.so.0.11800.0
gnome-sof   3178   3222 gmain              xxx  DEL       REG               0,36             35535180 /usr/lib64/libflatpak.so.0.11800.0
gnome-sof   3178   3227 pool-spaw          xxx  DEL       REG               0,36             35535180 /usr/lib64/libflatpak.so.0.11800.0
gnome-sof   3178   3228 gdbus              xxx  DEL       REG               0,36             35535180 /usr/lib64/libflatpak.so.0.11800.0
gnome-sof   3178   4053 [pango]            xxx  DEL       REG               0,36             35535180 /usr/lib64/libflatpak.so.0.11800.0
gnome-sof   3178   4063 dconf\x20          xxx  DEL       REG               0,36             35535180 /usr/lib64/libflatpak.so.0.11800.0
gnome-sof   3178   4110 gs-plugin          xxx  DEL       REG               0,36             35535180 /usr/lib64/libflatpak.so.0.11800.0
gnome-sof   3178   4111 gs-plugin          xxx  DEL       REG               0,36             35535180 /usr/lib64/libflatpak.so.0.11800.0
gnome-sof   3178   4112 gs-plugin          xxx  DEL       REG               0,36             35535180 /usr/lib64/libflatpak.so.0.11800.0
gnome-sof   3178   4113 gs-plugin          xxx  DEL       REG               0,36             35535180 /usr/lib64/libflatpak.so.0.11800.0
gnome-sof   3178   4121 gs-icon-d          xxx  DEL       REG               0,36             35535180 /usr/lib64/libflatpak.so.0.11800.0
gnome-sof   3178  13376 gly-globa          xxx  DEL       REG               0,36             35535180 /usr/lib64/libflatpak.so.0.11800.0
gnome-sof   3178  13377 async-io           xxx  DEL       REG               0,36             35535180 /usr/lib64/libflatpak.so.0.11800.0
gnome-sof   3178  13443 gly-hdl-e          xxx  DEL       REG               0,36             35535180 /usr/lib64/libflatpak.so.0.11800.0
flatpak-s  12561                           xxx  DEL       REG               0,36             35531878 /usr/libexec/flatpak-session-helper
flatpak-s  12561  12562 pool-spaw          xxx  DEL       REG               0,36             35531878 /usr/libexec/flatpak-session-helper
flatpak-s  12561  12563 gmain              xxx  DEL       REG               0,36             35531878 /usr/libexec/flatpak-session-helper
flatpak-s  12561  12564 gdbus              xxx  DEL       REG               0,36             35531878 /usr/libexec/flatpak-session-helper

$ systemctl --user restart  gnome-software.service
$ sudo lsof -n  | grep -w DEL |grep '/usr/lib'
flatpak-s  12561                           xxx  DEL       REG               0,36              35531878 /usr/libexec/flatpak-session-helper
flatpak-s  12561  12562 pool-spaw          xxx  DEL       REG               0,36              35531878 /usr/libexec/flatpak-session-helper
flatpak-s  12561  12563 gmain              xxx  DEL       REG               0,36              35531878 /usr/libexec/flatpak-session-helper
flatpak-s  12561  12564 gdbus              xxx  DEL       REG               0,36              35531878 /usr/libexec/flatpak-session-helper

You can use the dnf needs-restarting command to find services and processes that need to be restarted.

Note that the --reboot-hint does not work since dnf5. To see if a reboot is required you have to notice that you have a new kernel.

Personally I find using the dnf needs-restarting info too much like hard work so I just reboot.

‘dnf needs-restarting’ is quite unreliable. It is often not showing programs and services that still use some older libraries. So it’s lsof -n for me

But I have not used that for quite some time, so there may have been some improvements.

You can choose your own frequency really. I tend to update + reboot once a week unless there’s a critical security update.

Depending on what’s on the update, one may not need to restart, but this requires us, the users, to review the update package list and know whether an update is required. Tools like need-restart help, but may not provide the whole picture. Hence, the safe recommendation is: just reboot (or run the update on reboot, which is the preferred way now).

On why reboots are required after updates, there are lots of posts. For example:

you can search the forums for more discussions on the topic.

Linux is experiencing a massive increase in the rate at which bugs are being found. Some bugs may be exploited by “bad actors”. For years, large enterprises tested updates offline and systems were updated weekly, with occasional emergency updates for active exploits or breakage of mission-critical applications.

I suspect “occasional” has become “frequent”. For users who have time and resources, updating frequently means that if updates break something, a smaller number of packages are suspect. If you have a “mission-critical” application and the luxury of a “test” system, frequent updates and testing can help avoid downtime.