pacman-s
Search for packages in the repositories
TLDR
View documentation for the original command
SYNOPSIS
pacman -S [options] [package(s)]
pacman -Syu
pacman -Syyu
PARAMETERS
-S, --sync
Synchronize packages. This operation is implied when using 'pacman -S'.
-y, --refresh
Download fresh package databases from the server. Use twice (-yy) to force a refresh even if up-to-date.
-u, --sysupgrade
Upgrade all installed packages to their newer versions available in the repositories. Always recommended with -S and -y (e.g., pacman -Syu).
-w, --downloadonly
Download packages but do not install or upgrade them. Useful for caching packages for later offline installation.
-i, --info
Display information about the specified packages without installing them (e.g., pacman -Si package).
-s, --search
Search the local package databases for packages matching the provided regex (e.g., pacman -Ss term).
--noconfirm
Bypass all confirmation prompts. Use with extreme caution, especially in scripts.
--needed
Do not reinstall packages that are already installed and up-to-date. Useful when installing multiple packages.
--asdeps
Install packages as dependencies, meaning they can be automatically removed by 'pacman -Qtd'.
--asexplicit
Install packages as explicitly installed, preventing them from being removed automatically as orphans.
--ignore package
Exclude a package from being upgraded during a system upgrade. Can be specified multiple times.
--overwrite glob
Overwrite files that conflict with existing files on the system. Use with caution as it can lead to system instability.
DESCRIPTION
The "pacman -S" command is the core operation for package management in Arch Linux and its derivatives. It is primarily used for synchronizing the local package database with the remote repositories, installing new packages, and performing a full system upgrade. When executed, it downloads packages and their dependencies from configured repositories, verifies their integrity, and installs them onto the system. It's fundamental for maintaining an up-to-date and functional Arch Linux installation.
CAVEATS
Always perform a full system upgrade with pacman -Syu before installing new packages to avoid partial upgrades, which can lead to system instability. Using options like --noconfirm, --force, or --overwrite can bypass important safety checks and potentially damage your system if not used carefully and with full understanding of their implications. Regularly check the Arch Linux news before major system upgrades for potential manual intervention steps.
FULL SYSTEM UPGRADE
The most common and recommended way to update your Arch Linux system is by running 'pacman -Syu'. This command first synchronizes the package databases and then upgrades all installed packages to their latest versions, ensuring consistency across the system.
INSTALLING NEW PACKAGES
To install a specific package, use 'pacman -S package-name'. You can install multiple packages at once by listing them: 'pacman -S package1 package2'. It's best practice to run 'pacman -Syu' first to ensure your databases are current.
DATABASE SYNCHRONIZATION ONLY
To only refresh the package databases without performing any upgrades or installations, use 'pacman -Sy'. Using 'pacman -Syy' forces a refresh even if the databases appear up-to-date, which can be useful after mirror list changes.
HISTORY
Pacman (Package Manager) was created by Judd Vinet, the founder of Arch Linux, and first released in 2002. It was designed to provide a simple, powerful, and fast way to manage packages on Arch Linux's rolling release model. The '-S' (sync) operation has been a fundamental part of pacman's functionality since its inception, enabling users to keep their systems up-to-date and install new software efficiently from centralized repositories.