'\" t
.\" Title: pacman
.\" Author: [see the "Authors" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot
.\" Date: 2024-09-09
.\" Manual: Pacman Manual
.\" Source: Pacman 7.0.0
.\" Language: English
.\"
.TH "PACMAN" "8" "2024\-09\-09" "Pacman 7\&.0\&.0" "Pacman Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
pacman \- package manager utility
.SH "SYNOPSIS"
.sp
\fIpacman\fR [options] [targets]
.SH "DESCRIPTION"
.sp
Pacman is a package management utility that tracks installed packages on a Linux system\&. It features dependency support, package groups, install and uninstall scripts, and the ability to sync your local machine with a remote repository to automatically upgrade packages\&. Pacman packages are a zipped tar format\&.
.sp
Since version 3\&.0\&.0, pacman has been the front\-end to \fBlibalpm\fR(3), the \(lqArch Linux Package Management\(rq library\&. This library allows alternative front\-ends to be written (for instance, a GUI front\-end)\&.
.sp
Invoking pacman involves specifying an operation with any potential options and targets to operate on\&. A \fItarget\fR is usually a package name, file name, URL, or a search string\&. Targets can be provided as command line arguments\&. Additionally, if stdin is not from a terminal and a single hyphen (\-) is passed as an argument, targets will be read from stdin\&.
.SH "OPERATIONS"
.PP
\fB\-D, \-\-database\fR
.RS 4
Operate on the package database\&. This operation allows you to modify certain attributes of the installed packages in pacman\(cqs database\&. It also allows you to check the databases for internal consistency\&. See
Database Options
below\&.
.RE
.PP
\fB\-Q, \-\-query\fR
.RS 4
Query the package database\&. This operation allows you to view installed packages and their files, as well as meta\-information about individual packages (dependencies, conflicts, install date, build date, size)\&. This can be run against the local package database or can be used on individual package files\&. In the first case, if no package names are provided in the command line, all installed packages will be queried\&. Additionally, various filters can be applied on the package list\&. See
Query Options
below\&.
.RE
.PP
\fB\-R, \-\-remove\fR
.RS 4
Remove package(s) from the system\&. Groups can also be specified to be removed, in which case every package in that group will be removed\&. Files belonging to the specified package will be deleted, and the database will be updated\&. Most configuration files will be saved with a
\fI\&.pacsave\fR
extension unless the
\fI\-\-nosave\fR
option is used\&. See
Remove Options
below\&.
.RE
.PP
\fB\-S, \-\-sync\fR
.RS 4
Synchronize packages\&. Packages are installed directly from the remote repositories, including all dependencies required to run the packages\&. For example,
pacman \-S qt
will download and install qt and all the packages it depends on\&. If a package name exists in more than one repository, the repository can be explicitly specified to clarify the package to install:
pacman \-S testing/qt\&. You can also specify version requirements:
pacman \-S "bash>=3\&.2"\&. Quotes are needed, otherwise the shell interprets ">" as redirection to a file\&.
.sp
In addition to packages, groups can be specified as well\&. For example, if gnome is a defined package group, then
pacman \-S gnome
will provide a prompt allowing you to select which packages to install from a numbered list\&. The package selection is specified using a space\- and/or comma\-separated list of package numbers\&. Sequential packages may be selected by specifying the first and last package numbers separated by a hyphen (\-)\&. Excluding packages is achieved by prefixing a number or range of numbers with a caret (^)\&.
.sp
Packages that provide other packages are also handled\&. For example,
pacman \-S foo
will first look for a foo package\&. If foo is not found, packages that provide the same functionality as foo will be searched for\&. If any package is found, it will be installed\&. A selection prompt is provided if multiple packages providing foo are found\&.
.sp
You can also use
pacman \-Su
to upgrade all packages that are out\-of\-date\&. See
Sync Options
below\&. When upgrading, pacman performs version comparison to determine which packages need upgrading\&. This behavior operates as follows:
.sp
.if n \{\
.RS 4
.\}
.nf
Alphanumeric:
1\&.0a < 1\&.0b < 1\&.0beta < 1\&.0p < 1\&.0pre < 1\&.0rc < 1\&.0 < 1\&.0\&.a < 1\&.0\&.1
Numeric:
1 < 1\&.0 < 1\&.1 < 1\&.1\&.1 < 1\&.2 < 2\&.0 < 3\&.0\&.0
.fi
.if n \{\
.RE
.\}
.sp
Additionally, version strings can have an
\fIepoch\fR
value defined that will overrule any version comparison, unless the epoch values are equal\&. This is specified in an
epoch:version\-rel
format\&. For example,
2:1\&.0\-1
is always greater than
1:3\&.6\-1\&.
.RE
.PP
\fB\-T, \-\-deptest\fR
.RS 4
Check dependencies; this is useful in scripts such as makepkg to check installed packages\&. This operation will check each dependency specified and return a list of dependencies that are not currently satisfied on the system\&. This operation accepts no other options\&. Example usage:
pacman \-T qt "bash>=3\&.2"\&.
.RE
.PP
\fB\-U, \-\-upgrade\fR
.RS 4
Upgrade or add package(s) to the system and install the required dependencies from sync repositories\&. Either a URL or file path can be specified\&. This is a \(lqremove\-then\-add\(rq process\&. See
Upgrade Options
below; also see
Handling Config Files
for an explanation on how pacman takes care of configuration files\&.
.RE
.PP
\fB\-F, \-\-files\fR
.RS 4
Query the files database\&. This operation allows you to look for packages owning certain files or display files owned by certain packages\&. Only packages that are part of your sync databases are searched\&. See
File Options
below\&.
.RE
.PP
\fB\-V, \-\-version\fR
.RS 4
Display version and exit\&.
.RE
.PP
\fB\-h, \-\-help\fR
.RS 4
Display syntax for the given operation\&. If no operation was supplied, then the general syntax is shown\&.
.RE
.SH "OPTIONS"
.PP
\fB\-b, \-\-dbpath\fR
.RS 4
Specify an alternative database location (the default is
/var/lib/pacman)\&. This should not be used unless you know what you are doing\&.
\fBNOTE\fR: If specified, this is an absolute path, and the root path is not automatically prepended\&.
.RE
.PP
\fB\-r, \-\-root\fR
.RS 4
Specify an alternative installation root (default is
/)\&. This should not be used as a way to install software into
/usr/local
instead of
/usr\&.
\fBNOTE\fR: If database path or log file are not specified on either the command line or in
\fBpacman.conf\fR(5), their default location will be inside this root path\&.
\fBNOTE\fR: This option is not suitable for performing operations on a mounted guest system\&. See
\fI\-\-sysroot\fR
instead\&.
.RE
.PP
\fB\-v, \-\-verbose\fR
.RS 4
Output paths such as the Root, Conf File, DB Path, Cache Dirs, etc\&.
.RE
.PP
\fB\-\-arch\fR
.RS 4
Specify an alternate architecture\&.
.RE
.PP
\fB\-\-cachedir\fR
.RS 4
Specify an alternative package cache location (the default is
/var/cache/pacman/pkg)\&. Multiple cache directories can be specified, and they are tried in the order they are passed to pacman\&.
\fBNOTE\fR: This is an absolute path, and the root path is not automatically prepended\&.
.RE
.PP
\fB\-\-color\fR
.RS 4
Specify when to enable coloring\&. Valid options are
\fIalways\fR,
\fInever\fR, or
\fIauto\fR\&.
\fIalways\fR
forces colors on;
\fInever\fR
forces colors off; and
\fIauto\fR
only automatically enables colors when outputting onto a tty\&.
.RE
.PP
\fB\-\-config\fR
.RS 4
Specify an alternate configuration file\&.
.RE
.PP
\fB\-\-debug\fR
.RS 4
Display debug messages\&. When reporting bugs, this option is recommended to be used\&.
.RE
.PP
\fB\-\-gpgdir\fR
.RS 4
Specify a directory of files used by GnuPG to verify package signatures (the default is
/etc/pacman\&.d/gnupg)\&. This directory should contain two files:
pubring\&.gpg
and
trustdb\&.gpg\&.
pubring\&.gpg
holds the public keys of all packagers\&.
trustdb\&.gpg
contains a so\-called trust database, which specifies that the keys are authentic and trusted\&.
\fBNOTE\fR: This is an absolute path, and the root path is not automatically prepended\&.
.RE
.PP
\fB\-\-hookdir\fR
.RS 4
Specify a alternative directory containing hook files (the default is
/etc/pacman\&.d/hooks)\&. Multiple hook directories can be specified with hooks in later directories taking precedence over hooks in earlier directories\&.
\fBNOTE\fR: This is an absolute path, and the root path is not automatically prepended\&.
.RE
.PP
\fB\-\-logfile\fR
.RS 4
Specify an alternate log file\&. This is an absolute path, regardless of the installation root setting\&.
.RE
.PP
\fB\-\-noconfirm\fR
.RS 4
Bypass any and all \(lqAre you sure?\(rq messages\&. It\(cqs not a good idea to do this unless you want to run pacman from a script\&.
.RE
.PP
\fB\-\-confirm\fR
.RS 4
Cancels the effects of a previous
\fI\-\-noconfirm\fR\&.
.RE
.PP
\fB\-\-disable\-download\-timeout\fR
.RS 4
Disable defaults for low speed limit and timeout on downloads\&. Use this if you have issues downloading files with proxy and/or security gateway\&.
.RE
.PP
\fB\-\-sysroot\fR
.RS 4
Specify an alternative system root\&. This path will be prepended to all other configuration directories and any repository servers beginning with
file://\&. Any paths or URLs passed as targets will not be modified\&. This allows mounted guest systems to be properly operated on\&.
.RE
.PP
\fB\-\-disable\-sandbox\fR
.RS 4
Disable the default sandbox applied to the process downloading files on Linux systems\&. Useful if experiencing landlock related failures while downloading files when running a Linux kernel that does not support this feature\&.
.RE
.SH "TRANSACTION OPTIONS (APPLY TO \FI\-S\FR, \FI\-R\FR AND \FI\-U\FR)"
.PP
\fB\-d, \-\-nodeps\fR
.RS 4
Skips dependency version checks\&. Package names are still checked\&. Normally, pacman will always check a package\(cqs dependency fields to ensure that all dependencies are installed and there are no package conflicts in the system\&. Specify this option twice to skip all dependency checks\&.
.RE
.PP
\fB\-\-assume\-installed\fR
.RS 4
Add a virtual package "package" with version "version" to the transaction to satisfy dependencies\&. This allows disabling the specific dependency checks without affecting all dependency checks\&. To disable all dependency checking, see the
\fI\-\-nodeps\fR
option\&.
.RE
.PP
\fB\-\-dbonly\fR
.RS 4
Adds/removes the database entry only, leaving all files in place\&.
.RE
.PP
\fB\-\-noprogressbar\fR
.RS 4
Do not show a progress bar when downloading files\&. This can be useful for scripts that call pacman and capture the output\&.
.RE
.PP
\fB\-\-noscriptlet\fR
.RS 4
If an install scriptlet exists, do not execute it\&. Do not use this unless you know what you are doing\&.
.RE
.PP
\fB\-p, \-\-print\fR
.RS 4
Only print the targets instead of performing the actual operation (sync, remove or upgrade)\&. Use
\fI\-\-print\-format\fR
to specify how targets are displayed\&. The default format string is "%l", which displays URLs with
\fI\-S\fR, file names with
\fI\-U\fR, and pkgname\-pkgver with
\fI\-R\fR\&.
.RE
.PP
\fB\-\-print\-format\fR
.RS 4
Specify a printf\-like format to control the output of the
\fI\-\-print\fR
operation\&. The possible attributes are: "%a" for arch, "%b" for builddate, "%d" for description, "%e" for pkgbase, "%f" for filename, "%g" for base64 encoded PGP signature, "%h" for sha256sum, "%m" for md5sum, "%n" for pkgname, "%p" for packager, "%v" for pkgver, "%l" for location, "%r" for repository, "%s" for size, "%C" for checkdepends, "%D" for depends, "%G" for groups, "%H" for conflicts, "%L" for licenses, "%M" for makedepends, "%O" for optional depends, "%P" for provides and "%R" for replaces\&. Implies
\fI\-\-print\fR\&.
.RE
.SH "UPGRADE OPTIONS (APPLY TO \FI\-S\FR AND \FI\-U\FR)"
.PP
\fB\-w, \-\-downloadonly\fR
.RS 4
Retrieve all packages from the server, but do not install/upgrade anything\&.
.RE
.PP
\fB\-\-asdeps\fR
.RS 4
Install packages non\-explicitly; in other words, fake their install reason to be installed as a dependency\&. This is useful for makepkg and other build\-from\-source tools that need to install dependencies before building the package\&.
.RE
.PP
\fB\-\-asexplicit\fR
.RS 4
Install packages explicitly; in other words, fake their install reason to be explicitly installed\&. This is useful if you want to mark a dependency as explicitly installed so it will not be removed by the
\fI\-\-recursive\fR
remove operation\&.
.RE
.PP
\fB\-\-ignore\fR
.RS 4
Directs pacman to ignore upgrades of package even if there is one available\&. Multiple packages can be specified by separating them with a comma\&.
.RE
.PP
\fB\-\-ignoregroup\fR
.RS 4
Directs pacman to ignore upgrades of all packages in
\fIgroup\fR, even if there is one available\&. Multiple groups can be specified by separating them with a comma\&.
.RE
.PP
\fB\-\-needed\fR
.RS 4
Do not reinstall the targets that are already up\-to\-date\&.
.RE
.PP
\fB\-\-overwrite\fR
.RS 4
Bypass file conflict checks and overwrite conflicting files\&. If the package that is about to be installed contains files that are already installed and match
\fIglob\fR, this option will cause all those files to be overwritten\&. Using
\fI\-\-overwrite\fR
will not allow overwriting a directory with a file or installing packages with conflicting files and directories\&. Multiple patterns can be specified by separating them with a comma\&. May be specified multiple times\&. Patterns can be negated, such that files matching them will not be overwritten, by prefixing them with an exclamation mark\&. Subsequent matches will override previous ones\&. A leading literal exclamation mark or backslash needs to be escaped\&.
.RE
.SH "QUERY OPTIONS (APPLY TO \FI\-Q\FR)"
.PP
\fB\-c, \-\-changelog\fR
.RS 4
View the ChangeLog of a package if it exists\&.
.RE
.PP
\fB\-d, \-\-deps\fR
.RS 4
Restrict or filter output to packages installed as dependencies\&. This option can be combined with
\fI\-t\fR
for listing real orphans \- packages that were installed as dependencies but are no longer required by any installed package\&.
.RE
.PP
\fB\-e, \-\-explicit\fR
.RS 4
Restrict or filter output to explicitly installed packages\&. This option can be combined with
\fI\-t\fR
to list explicitly installed packages that are not required by any other package\&.
.RE
.PP
\fB\-g, \-\-groups\fR
.RS 4
Display all packages that are members of a named group\&. If a name is not specified, list all grouped packages\&.
.RE
.PP
\fB\-i, \-\-info\fR
.RS 4
Display information on a given package\&. The
\fI\-p\fR
option can be used if querying a package file instead of the local database\&. Passing two
\fI\-\-info\fR
or
\fI\-i\fR
flags will also display the list of backup files and their modification states\&.
.RE
.PP
\fB\-k, \-\-check\fR
.RS 4
Check that all files owned by the given package(s) are present on the system\&. If packages are not specified or filter flags are not provided, check all installed packages\&. Specifying this option twice will perform more detailed file checking (including permissions, file sizes, and modification times) for packages that contain the needed mtree file\&.
.RE
.PP
\fB\-l, \-\-list\fR
.RS 4
List all files owned by a given package\&. Multiple packages can be specified on the command line\&.
.RE
.PP
\fB\-m, \-\-foreign\fR
.RS 4
Restrict or filter output to packages that were not found in the sync database(s)\&. Typically these are packages that were downloaded manually and installed with
\fI\-\-upgrade\fR\&.
.RE
.PP
\fB\-n, \-\-native\fR
.RS 4
Restrict or filter output to packages that are found in the sync database(s)\&. This is the inverse filter of
\fI\-\-foreign\fR\&.
.RE
.PP
\fB\-o, \-\-owns\fR
.RS 4
Search for packages that own the specified file(s)\&. The path can be relative or absolute, and one or more files can be specified\&.
.RE
.PP
\fB\-p, \-\-file\fR
.RS 4
Signifies that the package supplied on the command line is a file and not an entry in the database\&. The file will be decompressed and queried\&. This is useful in combination with
\fI\-\-info\fR
and
\fI\-\-list\fR\&.
.RE
.PP
\fB\-q, \-\-quiet\fR
.RS 4
Show less information for certain query operations\&. This is useful when pacman\(cqs output is processed in a script\&. Search will only show package names and not version, group, and description information; owns will only show package names instead of "file is owned by pkg" messages; group will only show package names and omit group names; list will only show files and omit package names; check will only show pairs of package names and missing files; a bare query will only show package names rather than names and versions\&.
.RE
.PP
\fB\-s, \-\-search\fR
.RS 4
Search each locally\-installed package for names or descriptions that match
regexp\&. When including multiple search terms, only packages with descriptions matching ALL of those terms are returned\&.
.RE
.PP
\fB\-t, \-\-unrequired\fR
.RS 4
Restrict or filter output to print only packages neither required nor optionally required by any currently installed package\&. Specify this option twice to include packages which are optionally, but not directly, required by another package\&.
.RE
.PP
\fB\-u, \-\-upgrades\fR
.RS 4
Restrict or filter output to packages that are out\-of\-date on the local system\&. Only package versions are used to find outdated packages; replacements are not checked here\&. This option works best if the sync database is refreshed using
\fI\-Sy\fR\&.
.RE
.SH "REMOVE OPTIONS (APPLY TO \FI\-R\FR)"
.PP
\fB\-c, \-\-cascade\fR
.RS 4
Remove all target packages, as well as all packages that depend on one or more target packages\&. This operation is recursive and must be used with care, since it can remove many potentially needed packages\&.
.RE
.PP
\fB\-n, \-\-nosave\fR
.RS 4
Instructs pacman to ignore file backup designations\&. Normally, when a file is removed from the system, the database is checked to see if the file should be renamed with a
\fI\&.pacsave\fR
extension\&.
.RE
.PP
\fB\-s, \-\-recursive\fR
.RS 4
Remove each target specified including all of their dependencies, provided that (A) they are not required by other packages; and (B) they were not explicitly installed by the user\&. This operation is recursive and analogous to a backwards
\fI\-\-sync\fR
operation, and it helps keep a clean system without orphans\&. If you want to omit condition (B), pass this option twice\&.
.RE
.PP
\fB\-u, \-\-unneeded\fR
.RS 4
Removes targets that are not required by any other packages\&. This is mostly useful when removing a group without using the
\fI\-c\fR
option, to avoid breaking any dependencies\&.
.RE
.SH "SYNC OPTIONS (APPLY TO \FI\-S\FR)"
.PP
\fB\-c, \-\-clean\fR
.RS 4
Remove packages that are no longer installed from the cache as well as currently unused sync databases to free up disk space\&. When pacman downloads packages, it saves them in a cache directory\&. In addition, databases are saved for every sync DB you download from and are not deleted even if they are removed from the configuration file
\fBpacman.conf\fR(5)\&. Use one
\fI\-\-clean\fR
switch to only remove packages that are no longer installed; use two to remove all files from the cache\&. In both cases, you will have a yes or no option to remove packages and/or unused downloaded databases\&.
.sp
If you use a network shared cache, see the
\fICleanMethod\fR
option in
\fBpacman.conf\fR(5)\&.
.RE
.PP
\fB\-g, \-\-groups\fR
.RS 4
Display all the members for each package group specified\&. If no group names are provided, all groups will be listed; pass the flag twice to view all groups and their members\&.
.RE
.PP
\fB\-i, \-\-info\fR
.RS 4
Display information on a given sync database package\&. Passing two
\fI\-\-info\fR
or
\fI\-i\fR
flags will also display those packages in all repositories that depend on this package\&.
.RE
.PP
\fB\-l, \-\-list\fR
.RS 4
List all packages in the specified repositories\&. Multiple repositories can be specified on the command line\&.
.RE
.PP
\fB\-q, \-\-quiet\fR
.RS 4
Show less information for certain sync operations\&. This is useful when pacman\(cqs output is processed in a script\&. Search will only show package names and not repository, version, group, and description information; list will only show package names and omit databases and versions; group will only show package names and omit group names\&.
.RE
.PP
\fB\-s, \-\-search\fR
.RS 4
This will search each package in the sync databases for names or descriptions that match
regexp\&. When you include multiple search terms, only packages with descriptions matching ALL of those terms will be returned\&.
.RE
.PP
\fB\-u, \-\-sysupgrade\fR
.RS 4
Upgrades all packages that are out\-of\-date\&. Each currently\-installed package will be examined and upgraded if a newer package exists\&. A report of all packages to upgrade will be presented, and the operation will not proceed without user confirmation\&. Dependencies are automatically resolved at this level and will be installed/upgraded if necessary\&.
.sp
Pass this option twice to enable package downgrades; in this case, pacman will select sync packages whose versions do not match with the local versions\&. This can be useful when the user switches from a testing repository to a stable one\&.
.sp
Additional targets can also be specified manually, so that
\fI\-Su foo\fR
will do a system upgrade and install/upgrade the "foo" package in the same operation\&.
.RE
.PP
\fB\-y, \-\-refresh\fR
.RS 4
Download a fresh copy of the master package databases
\fI(repo\&.db)\fR
from the server(s) defined in
\fBpacman.conf\fR(5)\&. This should typically be used each time you use
\fI\-\-sysupgrade\fR
or
\fI\-u\fR\&. Passing two
\fI\-\-refresh\fR
or
\fI\-y\fR
flags will force a refresh of all package databases, even if they appear to be up\-to\-date\&.
.RE
.SH "DATABASE OPTIONS (APPLY TO \FI\-D\FR)"
.PP
\fB\-\-asdeps\fR
.RS 4
Mark a package as non\-explicitly installed; in other words, set their install reason to be installed as a dependency\&.
.RE
.PP
\fB\-\-asexplicit\fR
.RS 4
Mark a package as explicitly installed; in other words, set their install reason to be explicitly installed\&. This is useful if you want to keep a package installed even when it was initially installed as a dependency of another package\&.
.RE
.PP
\fB\-k, \-\-check\fR
.RS 4
Check the local package database is internally consistent\&. This will check all required files are present and that installed packages have the required dependencies, do not conflict and that multiple packages do not own the same file\&. Specifying this option twice will perform a check on the sync databases to ensure all specified dependencies are available\&.
.RE
.PP
\fB\-q, \-\-quiet\fR
.RS 4
Suppress messages on successful completion of database operations\&.
.RE
.SH "FILE OPTIONS (APPLY TO \FI\-F\FR)"
.PP
\fB\-y, \-\-refresh\fR
.RS 4
Download fresh package file databases
\fI(repo\&.files)\fR
from the server\&. Use twice to force a refresh even if databases are up to date\&.
.RE
.PP
\fB\-l, \-\-list\fR
.RS 4
List the files owned by the queried package\&.
.RE
.PP
\fB\-x, \-\-regex\fR
.RS 4
Interpret each query as a regular expression\&.
.RE
.PP
\fB\-q, \-\-quiet\fR
.RS 4
Show less information for certain file operations\&. This is useful when pacman\(cqs output is processed in a script, however, you may want to use
\fI\-\-machinereadable\fR
instead\&.
.RE
.PP
\fB\-\-machinereadable\fR
.RS 4
Print each match in a machine readable output format\&. The format is
\fIrepository\e0pkgname\e0pkgver\e0path\en\fR
with
\fI\e0\fR
being the NULL character and
\fI\en\fR
a linefeed\&.
.RE
.SH "HANDLING CONFIG FILES"
.sp
Pacman uses the same logic as \fIrpm\fR to determine action against files that are designated to be backed up\&. During an upgrade, three MD5 hashes are used for each backup file to determine the required action: one for the original file installed, one for the new file that is about to be installed, and one for the actual file existing on the file system\&. After comparing these three hashes, the following scenarios can result:
.PP
original=X, current=X, new=X
.RS 4
All three files are the same, so overwrites are not an issue\&. Install the new file\&.
.RE
.PP
original=X, current=X, new=Y
.RS 4
The current file is the same as the original, but the new one differs\&. Since the user did not ever modify the file, and the new one may contain improvements or bug fixes, install the new file\&.
.RE
.PP
original=X, current=Y, new=X
.RS 4
Both package versions contain the exact same file, but the one on the file system has been modified\&. Leave the current file in place\&.
.RE
.PP
original=X, current=Y, new=Y
.RS 4
The new file is identical to the current file\&. Install the new file\&.
.RE
.PP
original=X, current=Y, new=Z
.RS 4
All three files are different, so install the new file with a
\fI\&.pacnew\fR
extension and warn the user\&. The user must then manually merge any necessary changes into the original file\&.
.RE
.PP
original=NULL, current=Y, new=Z
.RS 4
The package was not previously installed, and the file already exists on the file system\&. Install the new file with a
\fI\&.pacnew\fR
extension and warn the user\&. The user must then manually merge any necessary changes into the original file\&.
.RE
.SH "EXAMPLES"
.PP
pacman \-Ss ne\&.hack
.RS 4
Search for regexp "ne\&.hack" in package database\&.
.RE
.PP
pacman \-S gpm
.RS 4
Download and install gpm including dependencies\&.
.RE
.PP
pacman \-U /home/user/ceofhack\-0\&.6\-1\-x86_64\&.pkg\&.tar\&.gz
.RS 4
Install ceofhack\-0\&.6\-1 package from a local file\&.
.RE
.PP
pacman \-Syu
.RS 4
Update package list and upgrade all packages afterwards\&.
.RE
.PP
pacman \-Syu gpm
.RS 4
Update package list, upgrade all packages, and then install gpm if it wasn\(cqt already installed\&.
.RE
.SH "CONFIGURATION"
.sp
See \fBpacman.conf\fR(5) for more details on configuring pacman using the \fIpacman\&.conf\fR file\&.
.SH "SEE ALSO"
.sp
\fBalpm-hooks\fR(5), \fBlibalpm\fR(3), \fBmakepkg\fR(8), \fBpacman.conf\fR(5)
.sp
See the pacman website at https://archlinux\&.org/pacman/ for current information on pacman and its related tools\&.
.SH "BUGS"
.sp
Bugs? You must be kidding; there are no bugs in this software\&. But if we happen to be wrong, please report them to the issue tracker at https://gitlab\&.archlinux\&.org/pacman/pacman/\-/issues with specific information such as your command\-line, the nature of the bug, and even the package database if it helps\&.
.SH "AUTHORS"
.sp
Current maintainers:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Allan McRae
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Andrew Gregory
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Morgan Adamiec
.RE
.sp
Past major contributors:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Judd Vinet
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Aurelien Foret
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Aaron Griffin
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Dan McGee
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Xavier Chantry
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Nagy Gabor
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Dave Reisner
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Eli Schwartz
.RE
.sp
For additional contributors, use git shortlog \-s on the pacman\&.git repository\&.