yay

Preinstall steps

  • install base-devel is needed for compiling
    • sudo pacman -S --needed base-devel;
  • adjust makepkg threads to be dynamic
    • sudo sed -i "s/#MAKEFLAGS=\"-j2\"/MAKEFLAGS=\"-j\${nproc}\"/" /etc/makepkg.conf
  • fix makepkg options, disable debug packages
    • sudo sed -i 's/^OPTIONS=.*/OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto)/' /etc/makepkg.conf

Installing

cd /tmp
git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin
makepkg -si --noconfirm
yay -Y --devel --answerclean a --answerdiff n --removemake --cleanafter  --save

If replacing another AUR helper

Use yay -Y --gendb to generate a development package database for *-git packages that were installed without yay. This command should only be run once.

Source: https://github.com/Jguer/yay

Local AUR Repo

  • sudo nano /etc/makepkg.conf
    • PKGDEST=/home/packages
  • sudo systemctl --full --force edit repo.path
    • [Path]
      PathChanged=/home/packages
      Unit=repo.service
      TriggerLimitIntervalSec=30sec
      
      [Install]
      WantedBy=multi-user.target
  • sudo systemctl --user --full --force edit repo.service
    • [Service]
      Type=oneshot
      ExecStartPre=/usr/bin/logger Start - Local AUR Repo Update
      ExecStart=/bin/sh -c '/usr/bin/repo-add --nocolor --quiet --remove --prevent-downgrade /home/packages/bobs.db.tar.gz /home/packages/*.pkg.tar.zst'
      ExecStartPost=/usr/bin/logger Done - Local AUR Repo Update
      
      [Install]
      WantedBy=multi-user.target

Last modified: Mon Dec 1 21:17:36 2025