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: , , , , , , , , |

nss: p11-kit-trust.so exists in filesystem

error-failure-while-downloading-nitrux-icon-theme
ERROR: Failure while downloading nitrux-icon-theme

 

Arch/Manjaro Update Fails Downloading nitrux-icon-theme_3.5.3.tar.gz

 

I really hope this didn’t stump any of you. It’s okay, if it did, you probably didn’t use the console and therefor probably didn’t see what actually failed. So, the link to the package, nitrux-icon-theme_3.5.3.tar.gz, is dead. Which makes it kind of hard for the PKGBUILD script to download it, build it and install it.

 

Locating the missing source for nitrux-icon-theme on the AUR

 

And, if you run a quick pacman -Qi nitrux-icon-theme you quickly see there’s supposed to be a nitrux website at https://nitrux.in/. But, trying to go there, you can see they closed their doors. The project forked into two projects now known as NX Desktop and Nitrux OS.

 

I’m probably wrong (according to my girlfriend, I am always wrong), but since the launchpad.net team references the Nitrux OS domain, and it was the last source in the PKGBUILD in the AUR, I kind of assume it was the more “official” source (at least as far as following the package maintainer’s intent). Looking quickly at their website, we get sent off to trusty old GitHub where the repository is now Archived (this means, no longer supported).

 

Quick patching the PKGBUILD file for missing source nitrux-icon-theme

 

There’s a chance here the AUR package maintainer has noticed this and simply wants the package to die. He’s not responded to quite a few comments on the AUR as well. Anywho, here’s the fix:

 

error downloading sources nitrux-icon-theme
Edit the PKGBUILD for nitrux-icon-theme

 

  • Grab the latest release from GitHub: https://github.com/Nitrux/nitrux-icon-theme/archive/3.5.4.tar.gz
  • run md5sum on the gunzipped tarball
  • rerun pacman with –editmenu so it asks if you want to edit the PKGBUILD file
  • Select any option that allows you to edit the PKGBUILD file (for me, using yay this was [A]
  • Update the source field with the latest available release
  • Update the md5sum field with the m5sum command’s output
  • Write and exit the PKGBUILD file
  • Continue the installation

 

ERROR: Failure while downloading nitrux-icon-theme – Fixed! Quickly!

 

wget https://github.com/Nitrux/nitrux-icon-theme/archive/3.5.4.tar.gz
md5sum 3.5.4.tar.gz
yay --editmenu -Syyu nitrux-icon-theme

 

Check out other random fixes on Gray Hat Freelancing.

2020-07-11T01:46:14-04:00May 22nd, 2020|Categories: Engineering, Random Fixes|Tags: , , , , , |
Go to Top