LinuxCommandLibrary

paru

Build and install AUR packages

TLDR

Interactively search for and install a package

$ paru [package_name_or_search_term]
copy

Synchronize and update all packages
$ paru
copy

Upgrade AUR packages
$ paru -Sua
copy

Get information about a package
$ paru -Si [package]
copy

Download PKGBUILD and other package source files from the AUR or ABS
$ paru --getpkgbuild [package]
copy

Display the PKGBUILD file of a package
$ paru --getpkgbuild --print [package]
copy

SYNOPSIS

paru <operation> [options] [targets]

Examples:
paru -Syu
paru -S package_name
paru -Rns package_name
paru -a search_term

PARAMETERS

-S, --sync
    Synchronize packages. Used for installing, upgrading, and refreshing the package database.

-R, --remove
    Remove packages. Can be used with options like -n (remove configs) or -s (remove unneeded dependencies).

-Q, --query
    Query the local package database. Used to list installed packages, check dependencies, etc.

-U, --upgrade
    Upgrade or install local packages (e.g., from a file path).

-F, --files
    Query the files database. Used to find which package owns a specific file.

-D, --database
    Database operations, like checking package files.

-a, --aur
    AUR specific operations. Used for searching (`paru -a search_term`) or showing package information (`paru -Ai package_name`) on the AUR.

--bottomup
    Build dependencies recursively from the bottom-up, ensuring all dependencies are built before the target.

--skipreview
    Skip the interactive PKGBUILD review step during installation/upgrade.

--noconfirm
    Bypass all confirmation prompts. Use with caution, especially in scripts.

--needed
    Do not reinstall targets that are already up-to-date.

--clean
    Clean unused build files from the cache.

--diff
    Show the diff of PKGBUILDs before building or installing. This is default for AUR packages.

--edit
    Edit the PKGBUILD file before building.

--m-a-s
    Enable multi-architecture support for building packages.

DESCRIPTION

paru is a powerful and efficient AUR helper for Arch Linux, designed to manage both packages from the Arch User Repository (AUR) and the official Arch Linux repositories. Written in Rust, it aims to be a fast, minimal, and secure alternative to other AUR helpers like `yay`.

It functions as a drop-in replacement for pacman, providing a unified command-line interface for common package management tasks such as installing, removing, searching, and upgrading packages. paru emphasizes a highly interactive experience by default, showing diffs of PKGBUILDs and prompting for user confirmation, but it also supports non-interactive operations. Its design focuses on integrating seamlessly with pacman's workflow and output.

CAVEATS

paru relies on pacman and makepkg, and therefore is specific to Arch Linux and its derivatives. While it simplifies AUR usage, users should always exercise caution and review PKGBUILDs before installing packages from the AUR, as these are user-submitted and not officially vetted by Arch Linux. Using --noconfirm in unattended scripts can lead to unexpected behavior if package changes are not anticipated.

BUILD PROCESS

When installing an AUR package, paru first fetches the PKGBUILD file from the AUR git repository. It then uses makepkg to build the package on your local system, resolving dependencies (both official and AUR). Once built, the resulting .pkg.tar.zst file is installed using pacman, just like any official package. This entire process is largely automated by paru.

CONFIGURATION

paru can be configured via a configuration file, typically located at /etc/paru.conf for system-wide settings or ~/.config/paru.conf for user-specific overrides. This file allows users to set default options, enable/disable interactive prompts, define build flags, and more, customizing paru's behavior to their preferences.

HISTORY

paru emerged from the Arch Linux community, created by developers who had previously contributed to the popular yay AUR helper. Its development began with the goal of creating a new AUR helper written in Rust, aiming for improved performance, memory safety, and a more pacman-like user experience with less verbose output by default. It quickly gained traction as a robust and modern alternative, inheriting and refining many of the best practices from its predecessors.

SEE ALSO

pacman(8), makepkg(8), yay(8), git(1)

Copied to clipboard