aur-fetch

aur-fetch is used to download package build files from the AUR.

Synopsis

aur fetch [options] <pkgbase...>

Description

aur-fetch downloads AUR packages using git. It clones repositories that don't exist locally and fetches updates for those that do.

By default, it only runs git fetch. You can control how upstream changes are integrated using the --sync option or its aliases (--merge, --rebase, --reset).

Options

  • --sync=<mode>: Specifies how to integrate upstream changes. The mode can be one of:
    • fetch (default): Only run git fetch.
    • merge: Fetch and then merge changes using git merge --ff-only.
    • rebase: Fetch and then re-apply local commits on top of upstream changes using git rebase.
    • reset: Fetch and then hard reset the local branch to the upstream branch, discarding all local changes and commits (git reset --hard origin/master).
    • auto: Use rebase if aurutils.rebase is set to true in the repository's git config, otherwise use merge.
  • --merge: Alias for --sync=merge.
  • --rebase: Alias for --sync=rebase.
  • --reset: Alias for --sync=reset.
  • --discard: Discard uncommitted local changes before merging or rebasing.
  • -r, --recurse: Download the package and all of its AUR dependencies recursively. Target arguments are treated as package names, not package bases.
  • --existing: Before fetching, check if the package exists in the AUR using git ls-remote.
  • --results=FILE: Write a colon-delimited log of actions to FILE. The format is <action>:<head_from>:<head_to>:file://<path>.

Environment Variables

  • AUR_LOCATION: The base URL for cloning AUR git repositories. Defaults to https://aur.archlinux.org.
  • AUR_FETCH_USE_MIRROR: If set to a positive integer, clones from an AUR mirror (github.com/archlinux/aur by default) where each package is a separate branch.