Skip to main content

Overview

The repo aur command is a specialized variant of repo get for cloning packages from the Arch User Repository (AUR). It automatically configures the correct AUR remote URL format.

Syntax

repo aur <package-name>

Parameters

package-name
string
required
The name of the AUR package to clone

How It Works

repo aur internally calls the same cloning logic as repo get, but uses the AUR-specific URL format:
[email protected]:<package-name>
The repository is cloned to:
$REPO_BASE_DIR/aur.archlinux.org/<package-name>/

Examples

Clone an AUR package

repo aur yay
This clones the yay package from AUR and creates:
$REPO_BASE_DIR/aur.archlinux.org/yay/
├── .bare/       # bare git repo
├── .git         # file pointing to .bare
└── master/      # worktree for master branch

Clone and build

repo aur paru
cd ~/repos/aur.archlinux.org/paru/master
makepkg -si

Use Cases

Building AUR packages

The worktree layout is particularly useful for AUR packages because you can:
  1. Keep the package source in one worktree
  2. Test modifications in a separate worktree
  3. Track upstream changes without disrupting your local builds
# Clone the package
repo aur package-name

# Create a worktree for your modifications
repo wt add custom-build

# In one terminal: build from master
cd ~/repos/aur.archlinux.org/package-name/master
makepkg -si

# In another terminal: test modifications
cd ~/repos/aur.archlinux.org/package-name/custom-build
# Edit PKGBUILD
makepkg -si

Maintaining AUR packages

If you maintain AUR packages, you can use worktrees for different versions:
repo aur my-package
repo wt add stable
repo wt add testing

# Update stable version
cd ~/repos/aur.archlinux.org/my-package/stable
# Make changes, test, commit

# Work on experimental features in testing
cd ~/repos/aur.archlinux.org/my-package/testing
# Experiment without affecting stable
  • repo get - Clone regular git repositories
  • repo convert - Convert existing AUR clones to worktree layout
  • repo wt - Manage worktrees after cloning

Notes

This command is Arch Linux-specific and only works with packages hosted on the Arch User Repository.
The AUR uses master as the default branch name rather than main.

Build docs developers (and LLMs) love