AUR helpers and makepkg
Installing from the Arch User Repository needs no helper at all. The base path is three commands: clone the repository that holds the build script, read the script, then build and install it with makepkg -si.
makepkg -si
What it does. Build the package described by the PKGBUILD in the current directory, installing the dependencies it needs and then the result.
Watch out. Read the PKGBUILD before you run this: building executes what is written in it.
The path without a helper
git clone <aur-repository-url>Each AUR package has its own git repository containing the PKGBUILD.
cd <package> && less PKGBUILDThe step that matters. Building runs what this file says.
makepkg -siBuilds and installs. makepkg is a separate program, so the explainer has no level for it; read the PKGBUILD first, because building runs what is written in it.
What the makepkg letters mean
makepkg is a separate program from pacman with its own options,
and these four are the ones that appear in nearly every set of instructions:
| Letter | Long form | What it does |
|---|---|---|
-s | --syncdeps | Install the dependencies the build needs, by calling pacman |
-i | --install | Install the built package afterwards, by calling pacman -U on the file |
-r | --rmdeps | Remove the dependencies that were installed only for the build once it is finished |
-c | --clean | Delete the work directories the build left behind |
So makepkg -si is build, pull in what the build needs, install the
result. The file it produces is an ordinary package file, which is why the last
step is the same -U operation
you would use for any local package file.
What a helper automates
A helper is doing the loop above and adding the parts that are tedious by hand: searching the AUR, working out which AUR package depends on which, showing what changed in a PKGBUILD since the version you last built, and checking installed AUR packages for new versions.
yay and paru
The two are compared point by point on the yay and paru page; what follows is the short form.
These are the two most frequently mentioned helpers. The differences below are ones you can check in each project's own documentation. The two do the same job.
| Point | yay | paru |
|---|---|---|
| Implementation language | Go | Rust |
| Command style | pacman-style operation letters, with AUR searching added | pacman-style operation letters, with AUR searching added |
| Reviewing a PKGBUILD before building | Offers to show it as part of the build flow | Offers to show it as part of the build flow |
| Where the authority on the options is | Its own --help and manual page | Its own --help and manual page |
Both are themselves AUR packages, so the first one has to be installed the manual way described above. Installing a helper with a helper is a circle you have to break once.
Mixing a helper with pacman
Nothing breaks by using both: the helper calls pacman anyway. The one thing to
keep straight is that sudo pacman -Syu upgrades only what came from the repositories, so AUR
packages stay at the version you built until the helper rebuilds them.
pacman -Qm is what lists those.
Common questions
Do I need an AUR helper?
No. Cloning the package's git repository, reading the PKGBUILD and running makepkg -si does the same thing. A helper automates searching, dependency ordering and checking for new versions.
What does makepkg -si do?
It builds the package described by the PKGBUILD in the current directory. The s installs the dependencies the build needs by calling pacman, and the i installs the finished package file afterwards.
What is the difference between yay and paru?
They do the same job with the same pacman-style command style; the visible difference is the language each is written in, Go for yay and Rust for paru. Their own help output and manual pages are the authority on their options.