-   Arch (
-   -   Correct way to install an AUR package (

JonBardo 02-16-2020 03:20 PM

Correct way to install an AUR package

I'm not really sure what is the best way to install an AUR package. What I usually do is clone de git repo, then "makepkg -sic" and that is it.

I've also seen people doing "make clean install" instead, and other people doing "makepkg -s" then "pacman -u".

BW-userx 02-16-2020 03:27 PM

I think it would be
"make install clean"
because running clean first would clean out the compiled binaries ending up empty with nothing to install. I have not ran arch, but its clones, and use yum or pacman.

ondoho 02-17-2020 05:06 AM


Originally Posted by JonBardo (Post 6090833)
I've also seen people doing "make clean install"

That's not the same thing at all. It's a "manual" install that completely ignores distro package management.

and other people doing "makepkg -s" then "pacman -u".
Thatís basically the same as

makepkg -si

RickDeckard 03-12-2020 11:47 AM

If your package has a shell script for installation, you can try there.

MattMadness 12-02-2020 10:27 AM

You have a few methods of installation:

Best Way:
With an AUR Helper. These programs take care of the installation of packages from the AUR for you. I would recommend pikaur or yay. However you have to install these programs the manual way, which we'll get to here too.

Manual Way:
This involves "git clone"ing the source code from the AUR, and building from source. Here is how you install yay, for example...


$ sudo pacman -S git
$ git clone
$ cd yay
$ makepkg -si

Notice how we build with makepkg. It is the special program Arch has to automatically handle the build process of all AUR packages. There is generally no need to use the "make" command, because makepkg runs it anyways. The help of makepkg shows this:


matthew@Matthew-Netbook ~> makepkg --help
makepkg (pacman) 5.2.2

Make packages compatible for use with pacman

Usage: /usr/bin/makepkg [options]

  -A, --ignorearch Ignore incomplete arch field in PKGBUILD
  -c, --clean      Clean up work files after build
  -C, --cleanbuild Remove $srcdir/ dir before building the package
  -d, --nodeps    Skip all dependency checks
  -e, --noextract  Do not extract source files (use existing $srcdir/ dir)
  -f, --force      Overwrite existing package
  -g, --geninteg  Generate integrity checks for source files
  -h, --help      Show this help message and exit
  -i, --install    Install package after successful build
  -L, --log        Log package build process
  -m, --nocolor    Disable colorized output messages
  -o, --nobuild    Download and extract files only
  -p <file>        Use an alternate build script (instead of 'PKGBUILD')
  -r, --rmdeps    Remove installed dependencies after a successful build
  -R, --repackage  Repackage contents of the package without rebuilding
  -s, --syncdeps  Install missing dependencies with pacman
  -S, --source    Generate a source-only tarball without downloaded sources
  -V, --version    Show version information and exit
  --allsource      Generate a source-only tarball including downloaded sources
  --check          Run the check() function in the PKGBUILD
  --config <file>  Use an alternate config file (instead of '/etc/makepkg.conf')
  --holdver        Do not update VCS sources
  --key <key>      Specify a key to use for gpg signing instead of the default
  --noarchive      Do not create package archive
  --nocheck        Do not run the check() function in the PKGBUILD
  --noprepare      Do not run the prepare() function in the PKGBUILD
  --nosign        Do not create a signature for the package
  --packagelist    Only list package filepaths that would be produced
  --printsrcinfo  Print the generated SRCINFO and exit
  --sign          Sign the resulting package with gpg
  --skipchecksums  Do not verify checksums of the source files
  --skipinteg      Do not perform any verification checks on source files
  --skippgpcheck  Do not verify source files with PGP signatures
  --verifysource  Download source files (if needed) and perform integrity checks

These options can be passed to pacman:

  --asdeps        Install packages as non-explicitly installed
  --needed        Do not reinstall the targets that are already up to date
  --noconfirm      Do not ask for confirmation when resolving dependencies
  --noprogressbar  Do not show a progress bar when downloading files

If -p is not specified, makepkg will look for 'PKGBUILD'

Using this documentation, we can see that "s" will sync the dependencies of the packages, "i" will install the package. You could use the "c" flag to clean up the build after installation, but most people don't do that.

I would recommend using an AUR helper, so you don't have to go to the AUR website to check every time something might have an update (what a hassle!). I would recommend using the pikaur aur helper, I've gotten into it and like it more then yay.

All times are GMT -5. The time now is 03:29 PM.