I’m using mainly packages from the Arch repos but also some from the AUR. My question is:
Should I use sudo pacman -Syyu which will update the Arch repos, and then update AUR using yay, or is there a good command I can use with yay that will update both repos at the same time?
If I can just use yay to update both at the same time this would be better. I was aware of an old command (yay -Syua) that would do this but I’m not sure if this is still relevant or the best way to go. Help appreciated
I won’t say one approach is better than the other but logically - and I don’t know the inner workings of yay - all system files needs to be updated before you begin updating the PKGBUILDs from AUR.
Both pacman and yay is using libalpm - which should make them equal - and I have read - some other place - that yay maybe one of the best helpers available.
Yes yay to update, yay -S package name for specific package, or yay music or audio eg for a group to search then just enter the number or numbers 2 7 8 for multibles yay will sort them out and install
Yay is the best wrapper so far it is actively developed and new features are added
Hmm…I’ve just run yay without a command and it did a full system check/upgrade from both Arch repos and the AUR. Very clever! I’m interested into how it does this so I shall investigate. There’s always pamac-aur to check it with I suppose along with other options. If we’ve found one simple command then great. I’ll mark this as solved for now
What keeps you from using the excellent Welcome app for the purpose you want? It includes several other useful things and you can even customize it. In other distributions, you will not come across such a useful tool. https://endeavouros.com/docs/applications/welcome/
It’s a great tool indeed but I like to watch things in a terminal that I’ve set up myself. They do the same thing. Each to their own preference, but I’ve found that watching a terminal over the years has taught me a lot about the way Linux works
As far as I know, yay has only one fault - and it can ‘easily’ be gotten around. One of the options that can be used on the command line is –editmenu, which should allow you to make changes in a PKGBUILD file before installation. Unfortunately, this doesn’t always result in what you intend! Here is the man entry…
--editmenu
Show the edit menu. This menu gives you the option to edit or view PKGBUILDs before building.
Warning: Yay resolves dependencies ahead of time via the RPC. It is not recommended to edit pkgbuild variables unless
you know what you are doing.
This means that changes in dependencies (which are the main reason I have for editing PKGBUILDs) are ignored. Ways around this limitation, though, include using aura instead of yay, or (what I do) - just do the AUR install manually, ending up with makepkg -si just as the Archwiki recommends
Firstly, I just want to advise, I ALWAYS (and ALWAYS suggest) log out of your DE, and drop into a TTY → Ctrl+Alt+F2 on KDE for instance.
Also. . . As most every seasoned Arch user will suggest, make sure you keep a backup. I timeshift once a month so I can rollback just in case something goes wrong. Some people do hourly. I’ve never had any issue doing once a month personally, but that’s your call.
I would suggest running pacman -Syu as opposed to -Syyu unless you have some specific reason to do the double y. As per --help -
-y, --refresh download fresh package databases from the server
(-yy to force a refresh even if up to date)
So, if you’re always running -Syyu, you’re basically just redownloading things that may or may not need to be updated. It’s just a waste of bandwidth which may not mean much on your end, but for the host mirror, that could be costing them some extra money each month if everyone did that every time on every update check.
Lots of people run yay which is fine. It’s very much the same process as follows and I used to (and still do occasionally) run:
pacman -Syu
Followed by
yay -Sua
That will refresh Arch packages, then AUR respectively in that order.
Whenever you update your mirrorlist is when I would recommend passing the double y -Syyu to make sure everything is in sync with your new mirrors.
Now-a-days I usually just use topgrade and it does the whole gambit for me. But sometimes I feel the need to make sure it’s doing the separate processes and handle it accordingly.
Also don’t forget to occassionaly clear the cache pacman -Sc and orphans pacman -Rns $(pacman -Qdtq) as well as your journal. I usually clear the journal log and save 2 weeks worth of logs passing journalctl --vacuum-time=2weeks
And that’s about as indepth of updating as I’ve ever done. I hope it helps!