Yay vs "update system" in welcome tool

I read here in the forums that yay is all that’s needed to check updates and it does indeed work.

Though when I clicked the “update system” button in the welcome tool after running yay I got some substiantal core updates that needed reboot after.

Is that because yay updates all packages but not the core system?

What’s the equivalent terminal command to the “update system” button in welcome tool?

sudo pacman -Syu

Are you sure that those updates weren’t new since the time you ran yay and the welcome updater?

Although the commands are slightly different they are doing the same thing.

It wasn’t done exactly after but the time difference between the two was less than an hour and I was actually prompted for multiple core updates… quite unlikely they all came out in that timespan!

Not really. That is pretty common actually.

Depending on what they were, packages often come in small groups.

2 Likes

It was mostly KDE related so could be… maybe I can check logs?

So for future reference just running yay will prompt for core system updates as well?

1 Like

Yes. core is just one of the repository names.

yay actually updates more packages than pacman because it updates both repo and AUR packages.

2 Likes

Especially with an Arch based distro like EnOS. It all depends on when your mirror that you are updating from has synced. In the past, I have run an update on my system and about an hour later, recieved a notification that there are updates an hour later. Why? because my mirror did a sync.

1 Like

To safely check whether there are any updates use checkupdates script from the pacman-contrib package.

Do not check for updates using pacman or yay and just pressing n to decline updating. That has the same side-effect as running pacman -Sy, which is refreshing the local package database. That is not safe, and may lead to a partial update situation if you install any package afterwards. If you do that, update as soon as possible (with pacman -Syu), certainly before installing any new software.

To check whether there are updates to packages installed from the AUR using yay, it’s sufficient to run yay -Qua. That is perfectly safe.

Personally, I use a little script to check for updates when I’m impatiently awaiting for a package to be updated:

cu
#!/bin/bash
# Dependencies: pacman-contrib, yay

UPDATES=$(checkupdates; yay -Qua)
[[ "$UPDATES" == "" ]] && exit 2 || echo "$UPDATES" 
  
# assume packages containing these strings in name need reboot after updating
REBOOT="(ucode|cryptsetup|linux|nvidia|mesa|systemd|wayland|xf86-video|xorg|plasma|sddm)"

if [[ $UPDATES =~ $REBOOT ]]; then
  echo -ne "\nWarning: reboot after updating, just in case.\n"
  exit 1
fi
exit 0

Though, to be honest, on an Arch-based system, there is really no need to check for updates. There always are updates, unless you’ve just updated.

5 Likes

Exactly. Just update your system when you want to update your system. There is no sense worrying about if there are updates, there pretty much are always updates.

I think we make it to complicated sometimes :slight_smile:

3 Likes

There is in fact, on a busy work day if you see some of those:

kernel
xorg
video drivers
systemd
glibc
gcc
qt

It’s just better to skip until weekend, just in case :laughing:

P.S. Or use backups / system restore :upside_down_face:

2 Likes

Then just don’t update until weekend :laughing:

“But, but… I must have the shiny new version of gcc, NOW!”

1 Like

Timeshift all the way!

Thanks all for the answers, learned something new :slight_smile:

3 Likes