Best way to update through terminal

I am trying to figure out the best way to update all my packages (including flatpaks) through terminal. I am on Fedora KDE 41.
This is the command I am using:

sudo dnf update --refresh -y; sudo flatpak update -y

The problem is that, it freezes more often than not while flatpaks are updating.
I have to use CTRL+ALT+F3 to bring up tty and CTRL+ALT+F2 to make it wake back up.
Is this normal?

I have noticed that the command above updates almost everything, but some themes I have downloaded seems to miss and I have to update them through β€œDiscover”. How can I improve this command?

What I normally do is similar.

sudo dnf upgrade && flatpak update

Does it behave the same or provide some useful information if you just do a flatpak -v update?

Can you see where (which repository?) these came from?

1 Like

The reason I don’t wanna use && is that when a single package fails for whatever reason, it stops continuing the rest of the update. That’s why I use ; instead.

Can you see where (which repository?) these came from?

They are downloaded from the β€œGet new” section on the β€œThemes” settings.
My main concern is, is it normal for a system to freeze while updating flatpaks? It is a rather powerful laptop, by the way.

Also, does my repolist look ok to you?

fedora                                                                               Fedora 41 - x86_64                                                                                      
fedora-cisco-openh264                                                                Fedora 41 openh264 (From Cisco) - x86_64                                                                
google-chrome                                                                        google-chrome                                                                                           
rpmfusion-free                                                                       RPM Fusion for Fedora 41 - Free                                                                         
rpmfusion-free-updates                                                               RPM Fusion for Fedora 41 - Free - Updates                                                               
rpmfusion-nonfree-nvidia-driver                                                      RPM Fusion for Fedora 41 - Nonfree - NVIDIA Driver                                                      
updates                                                                              Fedora 41 - x86_64 - Updates

I had to chroot and recover my system through liveCD not so long ago to fix my kernel settings. Now it says my kernel is 6.13.5-200.fc41.x86_64 (64-bit).
Is this normal? Will it update normally to later versions?

The themes look like they are installed via the kns-backend and don’t use flatpak or packagekit or rpm.

Can you run flatpak -v update and see if it throws any errors or where it hangs?

Does this tell you anything?

F: Calling system helper: Deploy
Updating 2/3…
F: Calling system helper: GetRevokefsFd
F: Calling system helper: GetRevokefsFd
F: flatpak_dir_pull: Using commit 0a8354c8b2b3638a7b2b65ddfc0ef3f365351fc909dba2e28f8835fd2e45b930 for pull of ref runtime/org.kde.digikam.Locale/x86_64/stable from remote flathub
Updating 2/3…                        0%  0 bytes/s
Updating 2/3…                        0%
Updating 2/3… β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%
F: Calling system helper: Deploy
Updating 3/3…
F: Calling system helper: GetRevokefsFd
F: Calling system helper: GetRevokefsFd
F: flatpak_dir_pull: Using commit 304dda70f4dbb21593d431a0ee0f78c6f66ed93dd513461aa63a744342f2a819 for pull of ref app/org.kde.digikam/x86_64/stable from remote flathub
Updating 3/3…                        0%  0 bytes/s
Updating 3/3… ▍                      2%
Updating 3/3… β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–        67%
F: Unexpectedly got > 100% progress, limiting
Updating 3/3… β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%  85,1 kB/sF: Calling system helper: Deploy
Updating 2/3…
F: Calling system helper: GetRevokefsFd
F: Calling system helper: GetRevokefsFd
F: flatpak_dir_pull: Using commit 0a8354c8b2b3638a7b2b65ddfc0ef3f365351fc909dba2e28f8835fd2e45b930 for pull of ref runtime/org.kde.digikam.Locale/x86_64/stable from remote flathub
Updating 2/3…                        0%  0 bytes/s
Updating 2/3…                        0%
Updating 2/3… β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%
F: Calling system helper: Deploy
Updating 3/3…
F: Calling system helper: GetRevokefsFd
F: Calling system helper: GetRevokefsFd
F: flatpak_dir_pull: Using commit 304dda70f4dbb21593d431a0ee0f78c6f66ed93dd513461aa63a744342f2a819 for pull of ref app/org.kde.digikam/x86_64/stable from remote flathub
Updating 3/3…                        0%  0 bytes/s
Updating 3/3… ▍                      2%
Updating 3/3… β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–        67%
F: Unexpectedly got > 100% progress, limiting
Updating 3/3… β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%  85,1 kB/s
Updating 3/3… β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%  85,1 kB/s
F: Calling system helper: Deploy
F: Calling system helper: RunTriggers
F: Calling system helper: PruneLocalRepo
Updates complete.
F: flathub:x86_64 appstream age 5943 is less than ttl 86400
F: fedora-testing:x86_64 appstream age 18446744073709551615 is greater than ttl 86400
F: fedora:x86_64 appstream age 5942 is less than ttl 86400

Updating 3/3… β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%  85,1 kB/s
F: Calling system helper: Deploy
F: Calling system helper: RunTriggers
F: Calling system helper: PruneLocalRepo
Updates complete.
F: flathub:x86_64 appstream age 5943 is less than ttl 86400
F: fedora-testing:x86_64 appstream age 18446744073709551615 is greater than ttl 86400
F: fedora:x86_64 appstream age 5942 is less than ttl 86400

Doesn’t look like anything is out of the norm. Did that hang?

Well, it hung but returned the last time. This usually happens when I haven’t updated in a day or so and there are many flatpaks to update. Do my repos look alright to you? And should I expect the kernel to be updated normally? That is my main concern, actually.

Are you using the :fedora: flatpak remotes
flatpak remotes
Should show it

The repos look ok to me.

What was the issue with the kernel install?
Are you using NVIDIA drivers?

Flatpak remotes return this:

Name    Options
flathub system
fedora  system,oci

The issue was that I somehow destroyed my GRUB a week ago while attempting to update NVIDIA. Long story short, my kernel was somehow updated to 6.14. I had to return it back to 6.13, specifically 6.13.5-200.fc41.x86_64
I think I somehow picked a very bad repository. Now, I do not need non-stable kernels. How can I know that my kernel is gonna get updated normally? This kernel number somehow looks off to me.

Were you testing something with rawhide or F42? I didn’t think 6.14 was in the fedora 41 repositories.

You can look at the updates for the kernel here: Fedora Updates System

It looks like .6 is in testing.

Yes, I was forced to use rawhide since regular drivers were very buggy. I didn’t know it could push an unstable kernel update. In any case, how can I know my current kernel is gonna update normally?

Given what you’ve posted here, it looks like you have the right repos enabled to receive the normal kernel updates from :fedora:

Will you get normal kernel updates, yes.
Can I tell you that those updates will never break something, no.
:fedora: moves at a fairly quick pace for kernel updates and that sometimes results in things breaking. This is why there are multiple kernels on a normal installation to allow you a fallback.

If you wanted to use an LTS kernel there are several posts here that explain installing it from COPR.

Thank you.

I have another issue, though.
So, I removed the kernel 6.14 and I need to update GRUB so it no longer shows up during boot. However, I cannot find the right GRUB update command.
I am trying this one: sudo grub2-mkconfig -o /boot/grub2/grub.cfg
and it returns:

/usr/libexec/os-probes/50mounted-tests: line 186: 62366 Segmentation fault      (core dumped) grub2-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/libexec/os-probes/50mounted-tests: line 186: 62394 Segmentation fault      (core dumped) grub2-mount "$partition" "$tmpmnt" 2> /dev/null
Adding boot menu entry for UEFI Firmware Settings ...
done

What does it mean?

That’s a bug, 2350327 – Segfault during grub2-mkconfig

2 Likes

I fixed it, however it still doesn’t remove obsolete kernels…

This is more or less what I do (except on atomic ones where I use rpm-ostree instead of dnf), but also sudo fwupdmgr refresh --force && sudo fwupdmgr update to make sure I cover firmware updates.

1 Like

I should run this command in addition to the one I already run, right?
Does this pose any risks regarding a laptop not booting correctly?

fwupdmgr is updating your BIOS/firmware from your OEM vendor, as well as UEFI keys, etc., so it’s more likely to help you continue to boot correctly (though it’s not going to fix your GRUB kernel cleanup problem).

1 Like

Maybe a list would be useful:
dnf for rpm packages from enabled repos
flatpak for flatpaks from enabled remotes
fwupd for UEFI firmware updates published to the lvfs

How about, for starters, adding
cargo for rust
npm for javascript
pip for python
perlmodinstall for cpan

What is installed on any particular computer encompasses a broad landscape. I fear that none of these additions have much to do with the OP’s request though. This is just to obviate that there is more to it in general.

So, then I have to incorporate this to my original command.
Could you please give me a final command that includes firmware updates as well?

The only thing I noticed is that with my current command, downloaded themes do not get updated, so I have to update them through discover. Any way to incorporate them as well?