aur-sync
Synchronize and build Arch User Repository packages
TLDR
Download one or more packages and their dependencies from the AUR, build them, and add them to a local repository
Upgrade local repository packages
Clean build files after install
Install a package without viewing changes in Vim and do not confirm dependency installation
Ignore specific packages when upgrading
SYNOPSIS
aur sync [-cCdhkmnSuv] [--chroot] [--dir] [--help] [--keep-going] [--missing] [--new] [--srcdir] [--update] [--repo] <pkgname>...
PARAMETERS
-c, --chroot
Use chroot directory $CHROOT_DIR (default: /var/lib/aurutils/chroot) instead of clean build dir. Requires makepkg-chroot(1).
-C, --config
Use alternative config file.
-d, --dir
Print clone directory only; do not clone or update.
-h, --help
Display help and exit.
-k, --keep-going
Continue processing on non-zero exit status.
-m, --missing
Clone only missing dependencies (requires -S or dependency mode).
-n, --new
Clone only new packages not already present.
-S, --srcdir
Clone source directory only (PKGBUILD + sources).
-u, --update
Update existing clone to latest commit.
--repo
Print AUR repository name instead of path.
DESCRIPTION
aur sync is a command from the aurutils suite, a collection of bash scripts designed to streamline interaction with the Arch User Repository (AUR). It clones the git repository of specified AUR packages (or their dependencies) into a local directory, typically $HOME/aur or the AUR_CLONE_DIR environment variable.
This prepares PKGBUILDs and sources for manual building with makepkg(8), avoiding direct git clones. It supports dependency resolution, updates to existing clones, and options for chroot builds or source-only fetching. Ideal for reproducible AUR package management without full AUR helpers like yay or paru.
Usage involves specifying package names; it handles recursive dependencies if needed. Outputs the package directory path for further actions like editing PKGBUILD or running makepkg.
CAVEATS
Requires git(1) and network access. Sets AUR_CLONE_DIR if unset. Not for binary installs; pair with makepkg(8). Dependency resolution may clone many packages.
ENVIRONMENT VARIABLES
AUR_CLONE_DIR: Clone base dir (default: $HOME/aur).
CHROOT_DIR: Chroot path (default: /var/lib/aurutils/chroot).
EXIT STATUS
0 on success; 1 for missing packages or git errors; 2 for invalid args.
HISTORY
Part of aurutils by Alad Wenter, first released in 2017. Evolved for safe, scriptable AUR handling amid helper security concerns; latest versions improve chroot and dependency features.


