Very useful yay commands for maintaining Arch-based linux distributions

About yay

yay commands using updates based on time, instead of version numbers, uses both official repository and aur simultaneously, loops sudo to prevent authenticating more than once, saves to config

Yay, Yet another Yogurt. is a command line tool for accessing the AUR (Arch User Repository) and managing packages on Linux Arch and Arch-based distributions (see: Manjaro and many more..). Written in Go, yay has been tried and tested for many years and remains my go to package manager for any distribution that supports use of the AUR.

That said, many users find themselves in deep water when they’ve accidentally allowed their packages to come into a “partially updated” state. This most often happens when people bounce from repository to repository trying to scratch a tiny itch (like say, from stable to testing or, more likely, from testing back to stable). These kinds of transitions need careful steps to be taken to be performed smoothly. And, even then, you should really have a good understanding of your operating systems before proceeding.

Either way, it’s possible, after a while or even heavy use, that you find yourself in a situation where your packages are in a “partially updated” state. And, of course, we all need to do a little spring cleaning, from time to time. The following yay commands will help you immensely.

Full System Update Using Yay  Commands

Copy

yay -Syyu

Lets break this down. First, we have -Syyu.

Here, -S tells yay we want to synchronize our package list with our upstream (defined in pacman.conf), an obvious step in looking for updates.

Next we have the repeated -yy this tells yay to get a fresh list of packages, and the second iteration tells yay to get a fresh list of packages even if our current list is not out-dated. This yay command should not be abused more than once a day.

Finally, we have -u, which predictably tells yay to upgrade any out-of-date packages. But, we still have these other toggles and why do I use them? It’s because I use the AUR.

Thise particular yay command is useful anytime you notice you have a package that has a version number that is abnormal.

yay shows packages with unusual version numbers

And here’s why. --timeupdate the timeupdate toggle tells yay to ignore version numbers and look for the date and time the latest PKGBUILD was pushed upstream to judge whether an upgrade is available for a package or not. This is critically important if you happen to get a package that’s orphaned often or otherwise has inconsistent version numbers.

Combined upgrade is exactly what it sounds like. Adding the toggle --combinedupgrade tells yay to upgrade packages from both the official upstream repository, as well as from the AUR, at the same time.

This one is simply handy. --sudoloop keeps sudo in play, in the background, during the various PKGBUILD processes, so that you don’t have to keep authenticating during longer package builds.

--save, of course, saves the toggles you used this time as the default toggles, for the next time you run any yay commands. It will assume these options, unless you specify otherwise.

Yay commands for maintenance

Due to the nature of the AUR, lint can tend to get left all over your system. Be it an orphhttps://www.grayhatfreelancing.com/aned package, or a PKGBUILD changed dependencies or requirements by the time it or some other package was removed. Here are some useful yay commands for maintaining the software on your system.

Copy to Clipboard

The yay command yay -Qt comes in quite useful when you’re cleaning your system of software lint. Or, in other words, software you may have explicitly installed, but can safely remove.

The -Q toggle stands for Query. You’re telling yay to query packages installed on your system.

The -t toggle stands for dependency test. This toggle for both pacman and yay will search for packages are that not required or not optionally required by any other installed package. Hence, they can safely be removed. If you’re feeling frisky, you can use the -t toggle twice, to include packages that are optionally required by installed packages. These can safely be removed without breaking any installed package, but you may lose some functionality if they’re not present.

2021-10-16T09:11:39-04:00October 12th, 2021|Categories: Engineering|Tags: , , , , , , , , |

p11-kit-trust.so exists in filesystem – Quickly Fixed!

Yikes! This page went to shit during migrations. I apologize for that. I will make a note to pay better attention to my SEO errors. The gist of this blog post was covering errors around “yay build file exists“. So, I’ll rebuild it from memory, the best I can. Hope this helps!

error: failed to commit transaction (conflicting files)

yay build file exists

yay build file exists

yay build file exists

yay build file existssudo pacman -Syyu –overwrite /usr/lib/p11-kit-trust.so –overwrite /usr/lib32/p11-kit-trust.so

This worked out just fine for me. The files were safely overwritten and the machine continue to function without any problems. So, if it’s simply a matter of an existing file that’s not shared by other packages, feel free to overwrite it.

yay build file exists

2020-07-14T00:05:36-04:00April 20th, 2020|Categories: Engineering, Random Fixes|Tags: , , , |
Go to Top