Skip to content

Latest commit

Β 

History

History
119 lines (79 loc) Β· 2.25 KB

File metadata and controls

119 lines (79 loc) Β· 2.25 KB

1. Using AUR (Arch User Repository) with yay

AUR contains community-maintained packages not found in official repos. To install from it, you'll need an AUR helper like yay.


1.1 Install yay (if not installed)

Step 1: Install prerequisites

sudo pacman -S --needed base-devel git

Step 2: Clone yay Git repo

cd ~
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si

Once done, you can use yay like pacman.


1.2 Search for a Package in AUR

yay -Ss <package_name>

Example:

yay -Ss google-chrome

πŸ“¦ 1.3 Install a Package from AUR

yay -S <package_name>

Example:

yay -S google-chrome

1.4 Update All Packages (Including AUR)

yay -Syu

1.5 Remove a Package Installed via yay

yay -Rns <package_name>

1.6 Clean Cached Packages

yay -Scc

Tips & Best Practices

  • βœ… Prefer official repo packages first.
  • πŸ” Use yay -Qi <package> to check installed package details.
  • πŸ“¦ Use yay -Qdt to list orphan packages.
  • πŸ•΅οΈ Use yay -Ql <package> to list installed files of a package.
  • πŸ“ Use yay -Qo <file> to find which package owns a file.
  • ⚠️ Be cautious with AUR: read PKGBUILD before installing unknown packages.

Handy Shortcuts

Task Command
Update all system packages yay -Syu
Search for a package yay -Ss
Remove a package (with config) yay -Rns <pkg>
Clean yay cache yay -Sc / yay -Scc
Remove orphan packages yay -Rns $(yay -Qtdq)

FAQ

1. What's the difference between -R, -Rs, and -Rns?

  • -R β†’ Just removes the package.
  • -Rs β†’ Removes the package + dependencies if unneeded.
  • -Rns β†’ Also removes config files & leftovers (full cleanup).

2. What if I can't find a package?

  • Use:
 yay -Ss <keyword>

Learn More