Skip to the content
pacman-master.com

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

not pacmangit clone <aur-repository-url>

Each AUR package has its own git repository containing the PKGBUILD.

not pacmancd <package> && less PKGBUILD

The step that matters. Building runs what this file says.

not pacmanmakepkg -si

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

LetterLong formWhat it does
-s--syncdepsInstall the dependencies the build needs, by calling pacman
-i--installInstall the built package afterwards, by calling pacman -U on the file
-r--rmdepsRemove the dependencies that were installed only for the build once it is finished
-c--cleanDelete 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.

Pointyayparu
Implementation languageGoRust
Command stylepacman-style operation letters, with AUR searching addedpacman-style operation letters, with AUR searching added
Reviewing a PKGBUILD before buildingOffers to show it as part of the build flowOffers to show it as part of the build flow
Where the authority on the options isIts own --help and manual pageIts 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.

How to check this page

Two commands on your own machine: pacman -<operation> --help lists the modifiers that operation accepts, and man pacman opens the pacman(8) manual page these descriptions are written from. Where the descriptions come from, and what this site is not, is set out on the about page.

This page was last edited on .