Configuring update reboots to restart in the middle of the night instead of in 10 minutes?

Hello! :slight_smile: I am a new Fedora user. I have Fedora installed on a mini PC I use to watch youtube and check emails on the TV. This is my first post, and I’ve read the 4-5 stickies and searched extensively before writing this, so hopefully I do this right :slight_smile:

Context: I like automatic updates, and I also like manually updating if I see the little icon in the toolbar. I also like how Fedora applies the updates after a reboot for more stability.

Problem Statement: Unfortunately, I keep getting the message, “The system is going down for a reboot at <in 10 minutes>.” And then it reboots in 10 minutes, interrupting the system. I think this is from the manual update. This is a problem because I often miss the message, and then the TV reboots right in the middle of when I’m doing something.

Question: is it possible to change a config file somewhere that will let me keep using the GUI system for upgrading, but have it schedule the restart for like 4 am, instead of 10 minutes from when the upgrade finishes?

What I’ve already tried: I have looked in the GUI settings, but only see options to upgrade automatically or not, and upgrade after a reboot, or not, but nothing about scheduling the reboots to offpeak times. I’ve also seen suggestions to not use the GUI and configure the system to use dnf instead, but I am hoping to keep things simple and GUI based, with minimal changes, if possible. That way if I mess something up, it isn’t messed up too badly.

Riposte: By extending the reboot to an “offpeak” time, there will be a few hours where the system will say it is updated, but not be protected by security fixes until the reboot happens. If I could set it granularly so that security updates were allowed to reboot the system in 10 minutes, but all normal updates would have to wait until 3 am, I would be happy with that too. But I don’t want every update to be able to restart the system while it is in use.

Meta-Question: If the feature I’m asking for doesn’t exist, could you Fine Folks of the Forum help me turn this post into a feature request for Gnome Software or whatever is scheduling the restart for 10 minutes for everything?

Catch-all disclaimer: If I am misunderstanding something, I apologize, and please do correct me.

Meta-comment: I don’t know exactly what triggers the reboot in 10 minutes message, or the exact text of the message, because I wasn’t paying 100% attention to it when it happened, but it has happened a handful of times now. There aren’t any more available updates, so I can’t find out the exact verbiage now, but next time the system has an update to apply, I’ll take screenshots and copy the messages.

Thanks! :smiley:

System Information

Operating System: Fedora Linux 44
KDE Plasma Version: 6.7.3
KDE Frameworks Version: 6.28.0
Qt Version: 6.11.1
Kernel Version: 7.1.4-202.fc44.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® N95
Memory: 12 GiB of RAM (11.4 GiB usable)
Graphics Processor: Intel® Graphics
Manufacturer: AZW
Product Name: MINI S

Run an sudo dnf update--refresh --offline whenever you like and then reboot at your convenience.

Alternatively stick a dnf update --refresh && reboot in roots crontab (or as a systemd timer) and time it for whenever you like.

You can also use the command line:

shutdown -r 120

To reboot in 2 hours. Of course, it is not particularly user-friendly, but will work for you now if you need it.

You have to use the sudo dnf offline reboot command to trigger the reboot and have the update transaction run.

You need to prepare the update, but I’m not sure the reboot iself must be initiated with dnf itself : I’ve had the update trigger on boot after an accidental poweroff caused by a flat battery!

You could still do it with something like “at” which is definitely better that “cron” for a one-off executio:

sudo at 0:01
[sudo] password for XXX:
warning: commands will be executed using /bin/sh
at Fri Jul 24 00:01:00 2026
at> dnf offline reboot
at>
(you press CTRL-D to exit)

You can list and delete scheduled commands with “at -l” and “at -d 1”

To prepare for an offline update you use the --offline option:

sudo dnf update --refresh --offline

You can check the status with:

sudo dnf offline status

If you do a reboot at this point the update is not applied.
You can check again with sudo dnf offline status.

The sudo dnf offline reboot changes which target systemd will use when the system reboot. And it is that target that causes dnf to apply the update.

Tl;dr you must to use sudo dnf offline reboot when you want the changes to be applied.

I know the theory, in practice any reboot will. I just did it and video it:

https://paulatz.freeboxos.fr/s/ZZbGoecNe3393kF

Before I posted I tested it as well. The update was not applied.

Thanks for all the information! I think my workaround will be:

  1. See the toolbar indicating that an update is needed.
  2. Run the following in terminal: sudo dnf update -- refresh --offline && sudo shutdown -r 04:00

Given that i have a workaround solution now, where can i make a feature request to get this capability into the GUI?

EDIT: Wait, do I have to do sudo dnf offline reboot specifically to reboot the computer and install the update? A regular reboot won’t always work? There is conflicting information in this thread.

Thanks!

Yes.

It will never work.

The offline reboot changes how the system boot up so that the update is applied.

Thank you for the clarification. It is weird that Steve and Lorenzo imply that regular reboots sometimes apply the updates, so I’m not sure what to believe.

Is it possible to combine the update with a one-off scheduling of dnf offline reboot for 4:00 am?

Ideally triggered by just one command.

Is there a way yo use the “at” command referenced above without needing ctrl-D? Something like:

sudo dnf upgrade --refresh --offline && sudo dnf offline reboot | at 4 am

?

It’s a simple process to do the test for yourself.

sudo dnf update --refresh --offline
sudo reboot

Does the update get applied?
For me the update is not applied.
I tested on kde plasma f43 and f44.
Maybe gnome does not work the same way?

As written it will reboot immeadiately.

Usually you will echo the command into at.
Also at 4 am the sudo will prompt for a password from you.

You could try this

echo dnf offline reboot | sudo at 4 am

Note that using sudo to run the at command means the dnf command is run as root.

Be aware that I never do offline updates unless I’m upgrading a major release. I just smack in a dnf update (so a live update) and then reboot at my leisure. I didn’t test the update command - just wrote it as I replied, but if you’re doing unattended updates in the middle of the night then I suspected you’d want a reboot.

My user also doesn’t prompt for sudo passwords either, whereas yours probably will.

You could try:

sudo dnf upgrade --refresh --offline && systemd-run --on-calendar=04:00 dnf offline reboot

This should ask for your password when you execute it, but not again at 4am.

Thank you! I’ll try that now.