In the next days I’ll install EOS and I’ve been reading a lot to avoid issues; I know I should update it from time to time and this is what I understood:
Time between updates can’t be too long, you can’t leave your system 3 months without maintenance
From terminal, execute pacman -Syu at least once (maybe twice?) a week to update system and installed community packages
From terminal, execute yay at least once a month to update same as #2, plus mirrors and AUR packages
About 3rd point, I guess this could be fine, because some AUR packages can take too much time to update and it would be better to do it fewer times than other updates, unless there’s any reason to do it as soon as possible.
As far as I’ve tested on VirtualBox, I’ll try to install most packages from community repositories and get only a few packages from AUR, like Sublime Text and Visual Studio Code.
So, the question is: Are my thoughts about keeping EOS updated right?
Thanks in advance for your answers and suggestions.
Issuing yay will update both the repo packages and the AUR packages (it is the same as running pacman -Syu, followed by yay -Sua to update AUR packages).
Updating once or twice a week is fine (this is what I’ve been doing for years).
Waiting a month between AUR updates is not really beneficial in my opinion, nor is it harmful. Just another choice.
Generally, it is okay to update once a week. Some users update daily (like myself), others update every other week or maybe a little less infrequent. There will be updates available daily; Arch is a very active distro and since Arch is a rolling distro, the philosophy is to always be current and up to date, but it is your system after all, so use it how it best suits you.
I will add, if you update daily, your updates will be smaller in download size. If you update weekly or every other week, the updates will be a lot bigger in download size, so it’ll be more to download and install the longer you wait. It’s not an issue at all, but just something to be aware of if download size or speed is a concern to you.
If you come across any problems a good starting point:
I’ve been meaning to do a post/cheat sheet for EOS users on my updating/system maintenance habits to run through the whole gambit. This question comes up enough it couldn’t hurt.
Other tips: check the forum if it’s been a while or you’re having an issue with an update - you may not be the only one.
Check the news to see if any notices or planned issues/manual interventions could be expected: https://archlinux.org/news/
Yes, I’m aware of this. My laptop is 7 years old and it takes some time to compile AUR packages; that’s why I want to use yay only once a month, maybe twice, but… you, guys, know a lot more than me, so I’ll try to update everything at first and I’ll decide later based on the time that it takes.
Cool, it makes sense.
That sounds like a rule to me; great tip!
Additionally, I must say that I like to play around with everything and I’m sure at some point I could break the whole thing. For my own sake, I’ll install Timeshift and make periodic snapshots and one more before try a big move.
P.S. It’s hard to choose an answer to mark this topic as solved.
Another consideration of frequent vs not so frequent updates is this. In the slim chance an updated package causes the system to fail in some way, you have two scenarios for finding the responsible package. Run a “pahis” then look through a daily update with generally 5 to 10 packages OR for a bi-weekly update, with a lot more packages (maybe up to a 100) to sort through.
If you update your AUR packages infrequently that means it is going to take longer because there will be more updates. Updating more frequently should actually make it more manageable.
You might also check to see if any of the packages that take a long time to compile have *-bin versions available.
Also - you can base your update decisions on how many are waiting… This is one of the reasons that I keep the main system updating to pacman -Syu, and do yay (AUR only) updates only when I have the time! yay -Qua will tell you what’s waiting in the AUR column (if you don’t already know from the notifier if you run it) and yay -Sua will do only pending AUR updates. Of course - that’s me - you do you!
Just like me! I’m taking note of yay -Qua command and I’ll search for its pacman equivalent.
Thanks again everybody for taking the time to post these great answers, now I have a lot more to investigate and a better idea of how to keep my future EOS updated.
one to add:
On rolling releases, you need to do a system update also before installing new packages everytime.
It can be that if the package does not have any dependencies that need an update… but checking this will take you more time
One way to check on update pending is to run checkupdates in a terminal - it provides a listing of what;s waiting in the queue for pacman. Or here are a couple of bash functions (copy them into your .bashrc) that give you update information with some style! ()
update info functions
# function to show a formatted list of pending updates
upls2() {
local updatesAUR=$(yay -Qua)
local updates=$(checkupdates)
# output RESULT
if [ -n "$updates" ] || [ -n "$updatesAUR" ]; then
echo "Repo packages"
echo "-------------"
{
echo "$updates"
} | column -t -N Name,Current,"->",New
echo " "
if [ -n "$updatesAUR" ]; then
echo " "
echo "AUR Packages"
echo "------------"
{
echo "$updatesAUR"
} | column -t -N Name,Current,"->",New
fi
#check for core system packages
RUN_KERNEL=$(cat /proc/version | sed 's|.*(\([^@]*\)@archlinux).*|\1|')
CHKLINE="amd-ucode\|intel-ucode\|btrfs-progs\|cryptsetup\|nvidia*\|mesa\|systemd*\|*wayland*\|xf86-video-*\|xorg-server*\|xorg-fonts*"
CHKLINE+="\|""${RUN_KERNEL}"
echo " "
echo $updates | grep -q ${CHKLINE} && echo "Reboot will be recommended due to the upgrade of core system package(s)." || echo "No reboot recommended after this update."
else
echo "No pending updates..."
fi
}
# Function to count available updates
upcnt() {
# create vars
NEWPKG=0
NEWAUR=0
# count AUR and pacman updates
NEWAUR=`yay -Qua | wc -l`
NEWPKG=`checkupdates | wc -l`
# output RESULTThis text will be hidden
if [[ ${NEWPKG} == 0 && ${NEWAUR} == 0 ]]; then
RESULT="System up-to-date"
else
RESULT=$NEWPKG" Repo pkgs + "$NEWAUR" AUR pkgs need updating"
fi
echo $RESULT
}
As currently written, just entering upls2 will give you a pretty list - and upcnt will give you a count of pacman (repo) packages and AUR pkgs pending. Enjoy!