How good or bad are offline updates?

I was reading this article:

Some of arguments seems to make sense, but I really don’t like to restart my computer to apply every single update and I’ve never had issues with online updates since I’ve left Windows at the end of last year, at first on Linux Mint and now on EndeavourOS for almost 4 months.

In that article, you can read:

As such, the adage that “Linux doesn’t need to restart to update” is a discredited meme. All Linux distributions should restart.

On my little experience, eventually, I’ve only had to restart some apps (like browsers) after an update that didn’t involve the kernel, that’s pretty faster than to reboot the computer to apply updates and then reboot again in order to get it working “as it should be”.

What do you think about offline updates? My guess is that Arch based distros are too much different from any other main distro and works in a different way, but, as a newbie, I could be wrong.

1 Like

This is absolutely true. There are some types of updates that require a restart to properly take effect. If you don’t know which are which, you probably should restart after receiving updates. EOS tries to notify you of updates which are likely to require a reboot but it isn’t a perfect list for every circumstance.

I think on a system where it is safe to process unattended updates, they are a good way to update your system.

Definitely, Arch updates cannot be safely run unattended. Arch updates often require manual intervention so this method is quite unsafe on Arch-based distros. That is why it is disabled upstream in software that supports it such as plasma.

4 Likes

I really like Fedoras approach. You are not forced to use it but it is very handy for normies.

3 Likes

For Fedora, outside of using say Gnome Software to run updates that require a restart, you can opt to do it manually in a “terminal centric” way as well for those that love using the terminal :wink:

To run updates via offline [in Fedora] (dnf-plugin-system-upgrade):

dnf offline-upgrade download
dnf offline-upgrade reboot

I may not be 100% on how this exact same process can be accomplished ‘the Arch way’, but now I am a bit curious, does Arch aka pacman have a similar way that’s as simple as running 2 commands (or something similar) to ONLY downloading updates and then having them applied manually during a reboot , basically like how the updates are applied offline like how Fedora does it. @dalto I have a feeling you already know this answer :wink:

I assume I can do something like sudo pacman -Syw to download the updates; and then reboot in a TTY and running pacman -Syu or yay in the TTY before logging back in would probably be the way to do it? Feel free to correct me of course.

2 Likes

In the case of fedora a system upgrade may involve installing, removing and downgrading libraries if there are conflicts, so offline upgrades cover this to avoid crashing the system, for this reason an upgrade between versions even if skipping a version works, for example i have my system fully updated (F36+updates-testing+koji), a distrosync operation (if i wanted to go to version 37 “rawhide”) done online would probably have some problems, because of the removal of libraries, maybe breaking the whole system as they would be overwritten in use.

Operations in dnf are complex and sometimes when people say that dnf is slow it is usually because they don’t know how powerful it is, as most operations can be undone with an (undo) in history, and before making any changes the entire transaction is verified, it will either happen or it won’t until you fix errors.

That is, offline updates in fedora are indicated and whenever possible used, you can do operations in dnf without restarting, but it is something you do at your own risk.

2 Likes

One should consider an update to be complete only after the system has rebooted.

However, that doesn’t mean you absolutely need to reboot right away after every update. Sure, you need to reboot for some updates to take effect, but if you don’t reboot right away, in most cases, you can continue using your computer normally, without even knowing an update took place. In other words, almost in all cases (with some very rare exceptions), you can reboot at your own leisure.

If you, for example, update the kernel package, you obviously won’t be using the new version until you reboot. However, the old version will still be loaded in memory, and in almost all cases, it will continue to work just fine. The same is true for your DE and almost anything else.

There are, of course exceptions, sometimes a program won’t run properly because an older version of some if its runtime dependecy is still loaded in memory, but in my experience, it’s easy to deal with such issues on a case by case basis. My general rule is: if something seems broken after an update, reboot first and only do troubleshooting if it is still broken after the reboot.

3 Likes

Team Fedora is simply playing safe. Rebooting to apply updates is nice but I updated Arch for a year without rebooting and I usually updated in the morning and used the PC all day. I didn’t have any problems. Just Firefox telling me to restart at most.
IMO Pop does the smartest thing: Reboot to apply only biannual release upgrades :+1:
If only openSUSE did this, I wouldn’t be asking myself why everything was crashing when updating :sweat_smile: (including Konsole which the package manager runs in)

1 Like

No, because that would be unsafe on Arch for the reasons I described above.

The fact that you haven’t logged into a graphical session yet doesn’t make your updates more or less safe and doesn’t change if a reboot is needed or not. So you would still need to reboot after applying the updates. Basically, you are doing an extra reboot for no purpose.

Of course, it is certainly safer to do updates in a TTY than in a terminal. However, you don’t need to exit your graphical session or reboot to do that. You can simply switch to a TTY and do your updates.

2 Likes

Some time ago, I happened to come across this man page about using systemd for offline updates.
I haven’t really given it any thought or looked into it any further.
I just wanted to share it here and perhaps get your thoughts/comments or other users’ about it.

https://man.archlinux.org/man/systemd.offline-updates.7.en

However, I realize that it might not be suitable to implement such a procedure for the reasons you mentioned above:

It is the same issue as above.

IMO, the only way offline updates would be safe on Arch is if pacman was modified so that it worked in phases. Handled all the parts requiring user interaction and then had a separate phase to perform the offline updates.

3 Likes

Thanks, everyone, for your replies.

Right now, I only reboot when EOS ask me to do so after an update that involves, kernel and some other stuff like systemd. If a program fails, I close it and open it again. Never happened yet, but if it still fails, a reboot should be the next step before guessing there’s really something wrong.

I really don’t like offline updates, but I blame Windows for that. Let’s see how offline updates evolve in Linux, maybe in a few months/years I could change my mind.

Interesting approach, it sounds like a good way to donwload the updates while keep on working and apply them when you’re ready, I would just skip the reboot before going to TTY.

Yes, totally makes sense trying to avoid any possible crash on distros that can manage unattended updates (yes, I’ve already read @dalto 's answer :wink:).

I’ve never thought of that, I’ll take note to not forget about it.

For the rest of your reply, I agree with everyting and the short version of it could be:

All Linux distributions should restart, but almost in all cases you can reboot at your own leisure

Same here, just for about 4 months.