LinuxCommandLibrary

pacman-upgrade

Upgrade installed packages on an Arch Linux system

TLDR

Install one or more packages from files

$ sudo pacman -U [path/to/package1.pkg.tar.zst path/to/package2.pkg.tar.zst ...]
copy

Install a package without prompting
$ sudo pacman -U --noconfirm [path/to/package.pkg.tar.zst]
copy

Overwrite conflicting files during a package installation
$ sudo pacman -U --overwrite [path/to/file] [path/to/package.pkg.tar.zst]
copy

Install a package, skipping the [d]ependency version checks
$ sudo pacman -Ud [path/to/package.pkg.tar.zst]
copy

Fetch and [p]rint packages that would be affected by upgrade (does not install any packages)
$ pacman -Up [path/to/package.pkg.tar.zst]
copy

Display [h]elp
$ pacman -Uh
copy

SYNOPSIS

pacman -Syu [options]

PARAMETERS

-S, --sync
    Synchronizes packages.

-y, --refresh
    Downloads fresh package databases from the server.

-u, --sysupgrade
    Upgrades all currently installed packages that are out-of-date.

--noconfirm
    Bypasses all confirmation prompts.

--ignore <package>
    Specifies a package or comma-separated list of packages to ignore during upgrade.

--ignoregroup <group>
    Specifies a package group to ignore during upgrade.

--print
    Prints the transaction details without executing the upgrade.

--overwrite <glob>
    Bypasses file conflict checks and forces the installation of conflicting files.

DESCRIPTION

The command pacman-upgrade is a common user-defined alias or wrapper script often used as a shorthand for sudo pacman -Syu on Arch Linux and its derivatives.

The underlying command, pacman -Syu, performs a full system upgrade. It works by first synchronizing the local package databases with the remote repositories (-y or --refresh), ensuring the system knows about the latest available package versions. After the databases are refreshed, it then proceeds to upgrade all installed packages that are out-of-date on the system (-u or --sysupgrade). The -S or --sync option is the primary operation mode for interacting with synchronized packages.

Regularly executing this command is crucial for maintaining a secure and up-to-date Arch Linux system, providing access to the latest features, bug fixes, and security patches. It should always be run with root privileges.

CAVEATS

The command pacman-upgrade itself is typically a user-defined alias or script, not a native pacman subcommand. The actual operation is performed by sudo pacman -Syu. Always run this command with sudo or as root.

Performing a partial upgrade (e.g., pacman -Sy without -u, or stopping the process prematurely) is unsupported and can lead to a broken system. Always allow the full pacman -Syu process to complete.

Before major upgrades, it's highly recommended to check the Arch Linux news for potential manual intervention required for certain packages or configuration changes.

<B>USAGE BEST PRACTICES</B>

To maintain a healthy Arch Linux system, run pacman -Syu regularly (e.g., weekly). Always perform a full system upgrade; avoid stopping the process or running pacman -Sy without -u, as this can lead to system instability. After kernel or critical system library updates, a reboot is highly recommended to ensure the new components are in use.

Before initiating a significant upgrade, especially after a period of not updating, check the Arch Linux news site (archlinux.org/news/) for announcements regarding required manual interventions or critical package changes.

HISTORY

Pacman (Package Manager) was created by Judd Vinet and first released in 2002 as the default package manager for Arch Linux. It was designed to be lightweight, simple, and fast, managing software packages from official repositories as well as user-built ones. The -Syu combination for a full system upgrade has been a core and fundamental operation of Pacman since its early development, ensuring users can easily keep their systems current with a single, powerful command.

SEE ALSO

pacman(8), pacman.conf(5)

Copied to clipboard