### Aur-sync --optdepends Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Example of using the --optdepends option with aur-sync to handle optional dependencies. ```bash aur-sync --optdepends pkgname ``` -------------------------------- ### Build and Update All AUR Packages Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Automatically download, build, and install all AUR packages that are currently installed on the system and have updates available. ```bash $ aursync -u ``` -------------------------------- ### Get all AUR package names Source: https://context7.com/aurutils/aurutils/llms.txt Use 'aur pkglist' to download and display the complete AUR package list. ```bash aur pkglist ``` -------------------------------- ### Complete AUR workflow: Setup, Search, Build, and Update Source: https://context7.com/aurutils/aurutils/llms.txt A comprehensive workflow for managing AUR packages, including setting up the environment, searching, checking dependencies, building in a clean environment, and updating. ```bash # 1. Set up environment export AURDEST="$HOME/aur" mkdir -p "$AURDEST" # 2. Search for a package aur search -v rofi # 3. Check package dependencies aur depends --table rofi-lbonn-wayland-git # 4. Build with container for clean environment aur sync -c rofi-lbonn-wayland-git # 5. Check for updates periodically aur repo -u # 6. Update all AUR packages aur sync -u ``` -------------------------------- ### Generating build.ninja with aur-sync Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Example of using aur-sync with the ninja build system. Set AUR_SYNC_USE_NINJA to enable ninja builds. The --no-build option generates build.ninja and prints the directory. ```bash AUR_SYNC_USE_NINJA=1 aur sync --keep-going --no-build ``` -------------------------------- ### Aur-depends --optdepends Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Example of using the --optdepends option with aur-depends to display optional dependencies. ```bash aur-depends --optdepends pkgname ``` -------------------------------- ### Aur-depends --graph Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Example of using the --graph option with aur-depends to visualize package dependencies. ```bash aur-depends --graph pkgname ``` -------------------------------- ### Build Package for a Different Architecture Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Build a package ('tclkit') for a different architecture (i686 in this example) using a specific local repository ('custom_i686'). The 'setarch' command is used to set the execution environment for the target architecture. ```bash $ setarch i686 aursync -c --repo=custom_i686 tclkit ``` -------------------------------- ### Download and Build AUR Packages Automatically Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Automate the process of downloading, building, and installing packages from the Arch User Repository (AUR). ```bash aursync ``` -------------------------------- ### Get Package Rebuild Order Source: https://github.com/aurutils/aurutils/blob/master/examples/README.md Retrieve the order in which packages should be rebuilt, considering repository configurations. This command ignores `optdepends`. ```bash $ arch-rebuild-order --repos=custom ``` -------------------------------- ### Get AUR package list with timestamp Source: https://context7.com/aurutils/aurutils/llms.txt Use 'aur pkglist --systime' to retrieve the package list along with its modification timestamp. ```bash aur pkglist --systime ``` -------------------------------- ### Use pkgbuilder with PACMAN Variable Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Set the PACMAN environment variable to specify a custom pacman executable for `pkgbuilder`. This example uses `officer`. ```bash PACMAN=officer pkgbuilder -Syu ``` -------------------------------- ### Format package information Source: https://context7.com/aurutils/aurutils/llms.txt Use 'aur format -f' to format JSON output from AUR queries into custom text. This example formats package name and version. ```bash aur query -t info mypackage | aur format -f '%n %v\n' ``` -------------------------------- ### Check AUR and Community Package Versions Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Use `aurcheck -d community -a` to compare versions of packages installed from the AUR against those in the official community repository. ```bash aurcheck -d community -a ``` -------------------------------- ### Recreate Foreign Packages with Bacman Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Generate PKGBUILD files for packages that are installed but not managed by pacman, based on system files. Results are saved to PKGDEST or the current directory. ```bash $ pacman -Qqm | while read -r b; do bacman "$b"; done ``` -------------------------------- ### Using aur-query with JSON Lines output Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Example of aur-query outputting newline-delimited JSON (JSON Lines) using jq -r. ```bash aur query -t info ``` -------------------------------- ### Create and initialize a local repository Source: https://context7.com/aurutils/aurutils/llms.txt Steps to create a local package repository directory, initialize an empty database, and add it to pacman.conf. ```bash sudo install -d /home/custompkgs -o $USER repo-add /home/custompkgs/custom.db.tar.gz cat >> /etc/pacman.conf << 'EOF' [custom] SigLevel = Optional TrustAll Server = file:///home/custompkgs EOF sudo pacman -Syu ``` -------------------------------- ### Update Installed AUR Packages from a Specific Local Repository Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Update AUR packages that are currently installed on the system and are also available in the specified 'custom' local repository. It filters the list of packages in the custom repository to only include those that are installed. ```bash $ aursync --repo=custom $(grep -Fxf <(pacman -Qq) <(pacman -Slq custom)) ``` -------------------------------- ### Create and configure aurutils environment file Source: https://context7.com/aurutils/aurutils/llms.txt Create the configuration directory and define environment variables for aurutils in the '~/.config/aurutils/env' file. ```bash mkdir -p ~/.config/aurutils cat > ~/.config/aurutils/env << 'EOF' AURDEST=/home/packages/aur AUR_PACMAN_AUTH=sudo --askpass AUR_PAGER=ranger AUR_REPO=custom EOF ``` -------------------------------- ### Create and Initialize a Local Repository Database Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Create the directory for a local repository and initialize its database using repo-add. If packages already exist, use repose to update the database. ```bash $ sudo install -d /var/cache/pacman/custom -o $USER $ repo-add /var/cache/pacman/custom/custom.db.tar ``` ```bash $ cd /var/cache/pacman/custom $ repose -vf custom.db ``` -------------------------------- ### Using aur-chroot with multiple options Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Demonstrates the combined use of --create, --build, and --update options in aur-chroot. Use --margs and --cargs for makechrootpkg options. ```bash aur-chroot --create --build --update --margs="-j8" --cargs="--nocheck" pkg1 pkg2 ``` -------------------------------- ### Aur-search union with -a Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Example of aur search returning the union of search results when the -a option is used. ```bash aur search -a pkg1 pkg2 ``` -------------------------------- ### Using aur-sync--ninja script Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Demonstrates how to use the aur-sync--ninja script with aur depends to generate a build.ninja file for package dependencies. ```bash aur depends --graph "$@" | aur sync--ninja "$PWD" -- aur build ``` -------------------------------- ### Build Package and Dependencies in nspawn Container Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Synchronize and build a specific package ('plasma-desktop-git') and its dependencies within an nspawn container environment. ```bash $ aursync -c plasma-desktop-git ``` -------------------------------- ### Select and Build AUR Package Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Interactively select a package matching the pattern 'pony' from the AUR and then build it using aursync. The 'select' command is used for interactive choice, and 'break' ensures only one package is processed. ```bash $ select a in $(aurgrep pony); do aursync "$a"; break; done ``` -------------------------------- ### Build Packages to a Local Repository Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Compile packages from PKGBUILD files and add them to a specified local repository. ```bash aurbuild ``` -------------------------------- ### Build Packages from a GitHub Repository Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Clone a GitHub repository containing PKGBUILDs, generate .SRCINFO files, create a package build queue using aurqueue, and then build the packages with aurbuild. ```bash $ git clone https://www.github.com/Earnestly/pkgbuilds $ cd pkgbuilds $ find -maxdepth 2 -name PKGBUILD -execdir mksrcinfo BSOL; $ aurqueue ./* > queue # Remove unwanted targets $ aurbuild -d custom -a queue ``` -------------------------------- ### Enable ninja build system Source: https://context7.com/aurutils/aurutils/llms.txt Enable the ninja build system for faster parallel builds by setting AUR_SYNC_USE_NINJA to 1. ```bash export AUR_SYNC_USE_NINJA=1 ``` -------------------------------- ### Build Packages in Chroot Source: https://context7.com/aurutils/aurutils/llms.txt Manages clean chroot environments for reproducible package builds using systemd-nspawn. Supports creation, update, and building packages. ```bash sudo aur chroot --create ``` ```bash sudo aur chroot --update ``` ```bash aur chroot --build ``` ```bash sudo aur chroot --create -- base-devel git ``` ```bash sudo aur chroot --create --pacman-conf /etc/aurutils/pacman-custom.conf ``` ```bash aur chroot --build --temp ``` ```bash aur chroot --build --margs '--skipchecksums' ``` ```bash aur chroot --build --bind-rw /home/ccache:/build/.ccache ``` ```bash aur chroot --build --namcap ``` ```bash aur chroot --path ``` -------------------------------- ### Configure Pacman for a Local Repository Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Set up a custom pacman configuration file to include a local repository. Ensure the repository name is not 'local' as it's reserved by pacman. ```bash [options] CacheDir = /var/cache/pacman/pkg CacheDir = /var/cache/pacman/custom CleanMethod = KeepCurrent [custom] SigLevel = Optional TrustAll Server = file:///var/cache/pacman/custom ``` ```bash # An example of a custom package repository. See the pacman manpage for # tips on creating your own repositories. Include = /etc/pacman.d/custom ``` -------------------------------- ### Configuring pacman for aur-repo-filter Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Demonstrates setting a custom pacman configuration file for aur-repo-filter using the --config option. ```bash aur-repo-filter --config /etc/pacman.conf ``` -------------------------------- ### Order Dependencies Using .SRCINFO Files Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Process .SRCINFO files to determine and order package dependencies, useful for creating build queues. ```bash aurqueue ``` -------------------------------- ### Build AUR Packages Automatically with aur sync Source: https://context7.com/aurutils/aurutils/llms.txt Use `aur sync` to automate the process of downloading, building, and managing AUR packages. It handles dependency resolution and integrates with local pacman repositories. Recommended for clean builds using systemd-nspawn containers. ```bash # Build a single AUR package with all dependencies aur sync firefox-developer-edition ``` ```bash # Build package in a clean systemd-nspawn container (recommended) aur sync -c plasma-desktop-git ``` ```bash # Update all AUR packages in the local repository aur sync -u ``` ```bash # Update packages without confirmation prompts aur sync -u --noconfirm ``` ```bash # Build multiple packages at once aur sync package1 package2 package3 ``` ```bash # Skip file inspection before building aur sync --no-view mypackage ``` ```bash # Force rebuild even if package exists aur sync -f mypackage ``` ```bash # Rebuild a package and all its AUR dependencies aur sync --rebuild-tree mypackage ``` ```bash # Use a specific local repository aur sync -d custom mypackage ``` ```bash # Ignore specific packages during upgrade aur sync -u --ignore=problematic-package,another-package ``` ```bash # Build with automatic PGP key retrieval aur sync -K mypackage ``` ```bash # Show what would be built without actually building aur sync -o mypackage ``` ```bash # Continue building using cached sources (skip download) aur sync --continue mypackage ``` ```bash # Build with signing enabled aur sync -S mypackage ``` -------------------------------- ### Set GNUPG home for PGP key imports Source: https://context7.com/aurutils/aurutils/llms.txt Configure a custom GNUPG home directory for PGP key operations using AUR_SYNC_GNUPGHOME. ```bash export AUR_SYNC_GNUPGHOME="$HOME/.gnupg/aur" ``` -------------------------------- ### Manage AUR Repositories Source: https://context7.com/aurutils/aurutils/llms.txt Commands for interacting with local AUR repositories, including listing, searching, and formatting output. ```bash aur repo --json ``` ```bash aur repo --list-repo ``` ```bash aur repo --list-path ``` ```bash aur repo --field depends ``` ```bash aur repo --search 'python-*' ``` ```bash aur repo -q --list ``` ```bash aur repo --format '%n %v' ``` -------------------------------- ### Create ignore file for package updates Source: https://context7.com/aurutils/aurutils/llms.txt Create a file at '~/.config/aurutils/sync/ignore' to specify packages that should be skipped during 'aur sync -u' operations. ```bash mkdir -p ~/.config/aurutils/sync cat > ~/.config/aurutils/sync/ignore << 'EOF' # Packages to ignore during aur sync -u custom/problematic-package custom/experimental-git # Packages in all repositories another-package EOF ``` -------------------------------- ### VCS Package Management: Build with pkgver() and check for updates Source: https://context7.com/aurutils/aurutils/llms.txt Manage Version Control System (VCS) packages by building them with pkgver() execution and checking for upstream updates. ```bash # Build VCS packages with pkgver() execution aur sync --pkgver neovim-git # Check VCS packages for upstream updates cd "$AURDEST" for d in *-git; do cd "$d" git fetch origin git log HEAD..origin/master --oneline cd .. done # Rebuild all VCS packages aur repo -d custom --list | grep -E '.*-git\s' | cut -f1 | xargs aur sync -f ``` -------------------------------- ### Aur-build with --nocheck Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Demonstrates passing the --nocheck option to the chroot environment during an aur-build process. ```bash aur-build --nocheck ``` -------------------------------- ### Aur-pkglist --verify Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Demonstrates the --verify option for aur-pkglist, which verifies published sha256sums. ```bash aur-pkglist --verify ``` -------------------------------- ### Verify checksums of the AUR package list Source: https://context7.com/aurutils/aurutils/llms.txt Use 'aur pkglist --verify' to verify the checksums of the downloaded package list. ```bash aur pkglist --verify ``` -------------------------------- ### Inspect AUR Build Files Source: https://context7.com/aurutils/aurutils/llms.txt Presents package build files for review, showing diffs from the last inspected version. Supports various output formats and filtering. ```bash aur view mypackage ``` ```bash aur view -a queue.txt ``` ```bash aur view --format diff mypackage ``` ```bash aur view --format log mypackage ``` ```bash aur view --exclude .SRCINFO mypackage ``` ```bash aur view --prefix mypackage ``` -------------------------------- ### Fetch AUR Build Files Source: https://context7.com/aurutils/aurutils/llms.txt Retrieve package build files from the AUR using git. Supports various merge strategies and input methods. ```bash aur fetch mypackage ``` ```bash aur fetch package1 package2 package3 ``` ```bash echo -e "package1\npackage2" | aur fetch - ``` ```bash aur fetch -S mypackage ``` ```bash aur fetch -f mypackage ``` ```bash aur fetch --rebase mypackage ``` ```bash aur fetch --reset mypackage ``` ```bash aur fetch --existing mypackage ``` ```bash aur fetch --results /tmp/fetch-results.txt mypackage ``` ```bash aur fetch --ff mypackage ``` -------------------------------- ### Aur-srcver with -E / --env Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Demonstrates the usage of the -E or --env option in aur-srcver for environment variable handling. ```bash aur-srcver -E ``` -------------------------------- ### Retrieving container path with aur-chroot Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Shows how to retrieve the container path using the --path option with aur-chroot, useful for integration with makepkg. ```bash aur-chroot --path ``` -------------------------------- ### Aur-pkglist user agent Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Illustrates setting the aurutils user agent for aur-pkglist requests using curl -A. ```bash aur-pkglist -A "aurutils" ``` -------------------------------- ### Build Packages Locally with aur build Source: https://context7.com/aurutils/aurutils/llms.txt Use `aur build` to compile packages from PKGBUILDs and add them to a local pacman repository. Supports host builds and containerized builds using systemd-nspawn. Can build from a queue file or the current directory. ```bash # Build current directory's PKGBUILD to the auto-detected repository aur build ``` ```bash # Build to a specific repository aur build -d custom ``` ```bash # Build with dependency installation via makepkg aur build --syncdeps ``` ```bash # Build inside a systemd-nspawn container aur build --chroot ``` ```bash # Build multiple packages from a queue file cat < queue.txt /path/to/package1 /path/to/package2 /path/to/package3 EOF aur build -a queue.txt ``` ```bash # Build and sign the package and database aur build --sign ``` ```bash # Force rebuild even if package exists aur build -f ``` ```bash # Build with custom makepkg arguments aur build --margs '--skipchecksums,--skippgpcheck' ``` ```bash # Run pkgver() before building (for VCS packages) aur build --pkgver ``` ```bash # Build without syncing the repository after aur build --no-sync ``` ```bash # Use custom pacman and makepkg configurations aur build --pacman-conf /path/to/pacman.conf --makepkg-conf /path/to/makepkg.conf ``` ```bash # Build with chroot and bind additional directories aur build --chroot --bind-rw /home/ccache:/build/.ccache ``` -------------------------------- ### Setting aurutils user agent Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Shows how to set the aurutils user agent for requests made by aur-query and aur-pkglist using curl -A. ```bash curl -A "aurutils" ``` -------------------------------- ### Set build files clone directory Source: https://context7.com/aurutils/aurutils/llms.txt Configure the directory where build files are cloned by setting the AURDEST environment variable. ```bash export AURDEST="$HOME/aur-packages" ``` -------------------------------- ### Aur-chroot command-line arguments Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Illustrates the updated command-line argument usage for aur-chroot, where arguments are exclusively for mkarchroot and arch-nspawn. ```bash aur-chroot --margs="--jobs 8" --cargs="--nocheck" pkg1 pkg2 ``` -------------------------------- ### Custom format with multiple fields Source: https://context7.com/aurutils/aurutils/llms.txt Demonstrates custom formatting of AUR query results using multiple fields like package name, version, and maintainer. ```bash aur query -t info mypackage | aur format -f '%n\t%v\t%m\n' ``` -------------------------------- ### Aur-srcver with stdin Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Demonstrates how aur-srcver can accept arguments from stdin when the '-' argument is specified. ```bash echo "pkgname" | aur-srcver - ``` -------------------------------- ### Generate Package Dependency Graph Source: https://context7.com/aurutils/aurutils/llms.txt Generates dependency graphs from .SRCINFO files. Can include optional dependencies. ```bash find . -name '.SRCINFO' -exec cat {} + | aur graph ``` ```bash aur graph -v OPTDEPENDS=1 < srcinfo-files ``` -------------------------------- ### Solve and Order Dependencies Using AUR RPC Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Resolve and order package dependencies by querying the AUR RPC interface. ```bash aurchain ``` -------------------------------- ### Inspect Build Files with view-delta Source: https://github.com/aurutils/aurutils/blob/master/examples/README.md Use `view-delta` to inspect build files, displaying diffs side-by-side with `git-delta` and remaining files with `bat`. It assumes files are not edited before the build process. ```bash view-delta # directly ``` ```bash AUR_PAGER=view-delta aur view ... ``` ```bash AUR_PAGER=view-delta aur sync ... ``` -------------------------------- ### Aur-query alias for --any Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Illustrates the use of the -a alias for the --any option in aur-query. ```bash aur-query -a ``` -------------------------------- ### Check Foreign Packages for AUR Updates Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Pipe the output of `pacman -Qm` to `aurcheck` to specifically check for updates to foreign (AUR) packages. ```bash pacman -Qm | aurcheck ``` -------------------------------- ### Aur-search --info output Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Shows the --info output for aur-search, including OptDepends, as added in version 7.2. ```bash aur search --info pkgname ``` -------------------------------- ### Run Pacman Considering Only Official Repositories Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Execute pacman commands, ensuring that only packages from the official Arch Linux repositories are considered, effectively ignoring any custom or AUR repositories. ```bash officer ``` -------------------------------- ### Check for Pacman Database and Filesystem Mismatches Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Identify packages where the pacman database information (like MD5 sums) does not match the actual files on the filesystem. ```bash $ pacman -Qqm | paccheck --md5sum --quiet ``` -------------------------------- ### Generate Debug Log for aurutils Source: https://github.com/aurutils/aurutils/blob/master/README.md Use this command to generate a debug log for aurutils when troubleshooting issues. Redirect output to a file for later analysis. ```bash AUR_DEBUG=1 aur >aurutils.log 2>&1 ``` -------------------------------- ### Enable debug mode Source: https://context7.com/aurutils/aurutils/llms.txt Enable debug logging for aurutils by setting the AUR_DEBUG environment variable to 1. ```bash export AUR_DEBUG=1 ``` -------------------------------- ### Search AUR Packages by Name Pattern Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Search the Arch User Repository (AUR) for packages matching a given pattern. ```bash aursearch ``` -------------------------------- ### Configure Makepkg for Package Destination and Create Repose Alias Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Set the PKGDEST variable in makepkg.conf to direct built packages to the pacman cache directory and create a shell alias for the repose command. ```bash $ sudoedit /etc/makepkg.conf ``` ```bash $ alias custom='repose -vf custom -r /var/cache/pacman/custom' ``` -------------------------------- ### Download Objects from an AUR Repository Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Retrieve specific objects (like package tarballs or .SRCINFO files) directly from an AUR repository. ```bash aurfetch ``` -------------------------------- ### Synchronize Pacman Package Database Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Update the local pacman package database to reflect changes in configured repositories. ```bash $ sudo pacman -Syu ``` -------------------------------- ### Manage Local Repositories with aur repo Source: https://context7.com/aurutils/aurutils/llms.txt Use `aur repo` to manage and query local pacman repositories configured with `file://` paths. It can display repository status, list packages, check for updates, and compare local packages against AUR versions. ```bash # Show repository status (name, root, path) aur repo --status ``` ```bash # List all packages in the repository aur repo --list ``` ```bash # List packages with detailed table format aur repo --table ``` ```bash # Check for AUR updates in the local repository aur repo --upgrades ``` ```bash # Check all repository packages against AUR (including older versions) aur repo -a ``` ```bash # Use a specific repository aur repo -d custom --list ``` -------------------------------- ### Check AUR Package Updates Source: https://context7.com/aurutils/aurutils/llms.txt Compares local package versions against AUR versions to find updates. Can process input from pacman or custom files. ```bash pacman -Qm | aur vercmp ``` ```bash aur repo -d custom --list | aur vercmp ``` ```bash pacman -Qm | aur vercmp --all ``` ```bash pacman -Qm | aur vercmp --current ``` ```bash pacman -Qm | aur vercmp -q ``` ```bash aur vercmp -p /path/to/versions.txt < packages.txt ``` -------------------------------- ### Print Lines Matching a Pattern in AUR Package List Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Search the AUR package list for lines that match a specified pattern and print them. ```bash aurgrep ``` -------------------------------- ### Search AUR Packages with aur search Source: https://context7.com/aurutils/aurutils/llms.txt Use `aur search` to query the AUR for packages based on various criteria like name, maintainer, or dependencies. Supports different output formats including JSON and verbose details. ```bash # Search by package name and description (default) aur search firefox ``` ```bash # Search by name only aur search -n firefox ``` ```bash # Search by maintainer aur search -m username ``` ```bash # Search by submitter aur search --submitter username ``` ```bash # Get detailed package information aur search -i package-name ``` ```bash # Get verbose output with more fields aur search -v firefox ``` ```bash # Output as JSON aur search --json firefox ``` ```bash # Search for packages that depend on a specific package aur search --depends python ``` ```bash # Search for packages that provide something aur search --provides libfoo ``` ```bash # Search with union of results (OR logic) aur search -a term1 term2 ``` ```bash # Sort results by popularity aur search -k Popularity firefox ``` ```bash # Short output (name, version, description only) aur search -q firefox ``` -------------------------------- ### Extract pkgbase from JSON Source: https://context7.com/aurutils/aurutils/llms.txt Use 'aur format -f' to extract specific fields like 'pkgbase' from JSON output. ```bash aur search --json mypackage | aur format -f '%b\n' ``` -------------------------------- ### Search AUR Packages by Dependency Source: https://github.com/aurutils/aurutils/blob/master/examples/README.md Use `aur repo` to search for packages in the AUR that depend on a specific pattern. The `--list` flag displays the results. ```bash aur repo --search '^python.*' --search-by depends --list ``` -------------------------------- ### Aur-query error handling Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Shows how aur-query handles unspecified -t options and ensures a newline in case of errors when using jq -r. ```bash aur-query -t ``` -------------------------------- ### Set custom elevation command Source: https://context7.com/aurutils/aurutils/llms.txt Configure a custom command for elevated privileges (e.g., sudo) by setting AUR_PACMAN_AUTH. ```bash export AUR_PACMAN_AUTH="doas" ``` -------------------------------- ### Filter AUR packages by name pattern Source: https://context7.com/aurutils/aurutils/llms.txt Use 'aur pkglist -F' to filter packages by a name pattern, such as wildcard matching. ```bash aur pkglist -F '*-git' ``` -------------------------------- ### Filter Packages in Arch Linux Repositories Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Filter packages based on criteria applied to the Arch Linux official repositories. ```bash aursift ``` -------------------------------- ### Set custom makepkg command Source: https://context7.com/aurutils/aurutils/llms.txt Specify a custom path to the makepkg command by setting the AUR_MAKEPKG environment variable. ```bash export AUR_MAKEPKG="/usr/bin/makepkg" ``` -------------------------------- ### Search AUR Packages by Multiple Criteria Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Perform an AUR search using a regular expression to find packages that contain both 'wm' and 'git' in their name or description. ```bash $ aursearch -P '(?.*=wm)(?.*=git)' ``` -------------------------------- ### Generate reverse dependency graph Source: https://context7.com/aurutils/aurutils/llms.txt Use 'aur graph' with REVERSE=1 to generate a reverse dependency graph. ```bash aur graph REVERSE=1 < srcinfo-files ``` -------------------------------- ### Set repository root path Source: https://context7.com/aurutils/aurutils/llms.txt Specify the root path for local repositories using the AUR_DBROOT environment variable. ```bash export AUR_DBROOT="/home/custompkgs" ``` -------------------------------- ### Search AUR packages with PCRE regex Source: https://context7.com/aurutils/aurutils/llms.txt Use 'aur pkglist -P' with a PCRE regex to search for packages. ```bash aur pkglist -P '(?=.*wm)(?=.*git)' ``` -------------------------------- ### Custom Build Script: Clean unused build files Source: https://context7.com/aurutils/aurutils/llms.txt A bash script 'aur-gc' to remove unused build files from the aur-sync cache by cleaning git repositories and identifying directories without PKGBUILD. ```bash #!/bin/bash # aur-gc - Remove unused build files in aur-sync cache XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache} AURDEST=${AURDEST:-$XDG_CACHE_HOME/aurutils/sync} # Clean git repositories find "$AURDEST" -name .git -execdir git clean -xdf \; # List directories without PKGBUILD for d in "$AURDEST"/*; do if [[ -d $d ]] && [[ ! -f $d/PKGBUILD ]]; then printf '%s\n' "$d" fi done ``` -------------------------------- ### Clean up unused packages from a custom repository Source: https://github.com/aurutils/aurutils/blob/master/examples/README.md This command filters a list of packages to remove those not present in a specified list, useful for cleaning up custom repositories. ```bash grep -Fxvf list.txt <(aur repo --list | cut -f1) | xargs -r repo-purge -f custom ``` -------------------------------- ### Use cower with Repository Exclusion Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Use `cower` to manage AUR packages, with the option to ignore specific repositories like `custom` using `--ignorerepo`. ```bash cower --ignorerepo=custom ``` -------------------------------- ### Sync AUR Packages Without Building Source: https://github.com/aurutils/aurutils/blob/master/examples/README.md Use `aur sync` to retrieve and inspect new AUR revisions or dependencies for target packages. The `--no-build` option prevents immediate package building. ```bash aur sync --no-build --no-ver-argv ``` -------------------------------- ### Resolve Package Dependencies Source: https://context7.com/aurutils/aurutils/llms.txt Retrieve and display dependency trees for AUR packages using aurweb. Supports various output formats and dependency types. ```bash aur depends mypackage ``` ```bash aur depends --reverse mypackage | tsort ``` ```bash aur depends --optdepends mypackage ``` ```bash aur depends --no-checkdepends mypackage ``` ```bash aur depends --table mypackage ``` ```bash aur depends --json mypackage ``` ```bash aur depends --jsonl mypackage ``` ```bash aur depends --all mypackage ``` ```bash aur depends --pkgname mypackage ``` ```bash aur depends --assume-installed=gcc,make mypackage ``` ```bash aur depends --verify mypackage ``` ```bash echo -e "pkg1\npkg2" | aur depends - ``` -------------------------------- ### Find Orphaned Packages in Custom Repository Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Search for orphaned packages within the 'custom' repository. This involves listing custom packages, searching for them in the AUR, and filtering results to find those with no maintainer. ```bash $ pacman -Slq custom | xargs -r aursearch -Fr | \ jq -r '.[].results[] | select(.Maintainer == null)' ``` -------------------------------- ### Query AUR RPC Interface Source: https://context7.com/aurutils/aurutils/llms.txt Low-level interface for querying the AUR RPC API. Supports various query types and input methods. ```bash aur query -t info package1 package2 package3 ``` ```bash aur query -t search firefox ``` ```bash aur query -t search -b maintainer username ``` ```bash aur query -t suggest partial-name ``` ```bash echo -e "pkg1\npkg2\npkg3" | aur query -t info - ``` -------------------------------- ### Build AUR Packages Respecting IgnorePkg Source: https://github.com/aurutils/aurutils/wiki/aurutils(7) Update AUR packages, similar to 'aursync -u', but explicitly ignore packages listed in pacman's IgnorePkg directive. This requires converting pacman's IgnorePkg configuration into a regular expression. ```bash $ aursync -u --ignore <(pacconf IgnorePkg | glob2regex.sh) ``` -------------------------------- ### Aur-query exit statuses Source: https://github.com/aurutils/aurutils/blob/master/NEWS.md Explains the different exit statuses for aur-query based on search results and error conditions. ```bash aur query ```