1PACMAN(8)                        Pacman Manual                       PACMAN(8)
2
3
4

NAME

6       pacman - package manager utility
7

SYNOPSIS

9       pacman <operation> [options] [targets]
10

DESCRIPTION

12       Pacman is a package management utility that tracks installed packages
13       on a Linux system. It features dependency support, package groups,
14       install and uninstall scripts, and the ability to sync your local
15       machine with a remote repository to automatically upgrade packages.
16       Pacman packages are a zipped tar format.
17
18       Since version 3.0.0, pacman has been the front-end to libalpm(3), the
19       “Arch Linux Package Management” library. This library allows
20       alternative front-ends to be written (for instance, a GUI front-end).
21
22       Invoking pacman involves specifying an operation with any potential
23       options and targets to operate on. A target is usually a package name,
24       file name, URL, or a search string. Targets can be provided as command
25       line arguments. Additionally, if stdin is not from a terminal and a
26       single hyphen (-) is passed as an argument, targets will be read from
27       stdin.
28

OPERATIONS

30       -D, --database
31           Operate on the package database. This operation allows you to
32           modify certain attributes of the installed packages in pacman’s
33           database. It also allows you to check the databases for internal
34           consistency. See Database Options below.
35
36       -Q, --query
37           Query the package database. This operation allows you to view
38           installed packages and their files, as well as meta-information
39           about individual packages (dependencies, conflicts, install date,
40           build date, size). This can be run against the local package
41           database or can be used on individual package files. In the first
42           case, if no package names are provided in the command line, all
43           installed packages will be queried. Additionally, various filters
44           can be applied on the package list. See Query Options below.
45
46       -R, --remove
47           Remove package(s) from the system. Groups can also be specified to
48           be removed, in which case every package in that group will be
49           removed. Files belonging to the specified package will be deleted,
50           and the database will be updated. Most configuration files will be
51           saved with a .pacsave extension unless the --nosave option is used.
52           See Remove Options below.
53
54       -S, --sync
55           Synchronize packages. Packages are installed directly from the
56           remote repositories, including all dependencies required to run the
57           packages. For example, pacman -S qt will download and install qt
58           and all the packages it depends on. If a package name exists in
59           more than one repository, the repository can be explicitly
60           specified to clarify the package to install: pacman -S testing/qt.
61           You can also specify version requirements: pacman -S "bash>=3.2".
62           Quotes are needed, otherwise the shell interprets ">" as
63           redirection to a file.
64
65           In addition to packages, groups can be specified as well. For
66           example, if gnome is a defined package group, then pacman -S gnome
67           will provide a prompt allowing you to select which packages to
68           install from a numbered list. The package selection is specified
69           using a space- and/or comma-separated list of package numbers.
70           Sequential packages may be selected by specifying the first and
71           last package numbers separated by a hyphen (-). Excluding packages
72           is achieved by prefixing a number or range of numbers with a caret
73           (^).
74
75           Packages that provide other packages are also handled. For example,
76           pacman -S foo will first look for a foo package. If foo is not
77           found, packages that provide the same functionality as foo will be
78           searched for. If any package is found, it will be installed. A
79           selection prompt is provided if multiple packages providing foo are
80           found.
81
82           You can also use pacman -Su to upgrade all packages that are
83           out-of-date. See Sync Options below. When upgrading, pacman
84           performs version comparison to determine which packages need
85           upgrading. This behavior operates as follows:
86
87               Alphanumeric:
88                 1.0a < 1.0b < 1.0beta < 1.0p < 1.0pre < 1.0rc < 1.0 < 1.0.a < 1.0.1
89               Numeric:
90                 1 < 1.0 < 1.1 < 1.1.1 < 1.2 < 2.0 < 3.0.0
91
92           Additionally, version strings can have an epoch value defined that
93           will overrule any version comparison, unless the epoch values are
94           equal. This is specified in an epoch:version-rel format. For
95           example, 2:1.0-1 is always greater than 1:3.6-1.
96
97       -T, --deptest
98           Check dependencies; this is useful in scripts such as makepkg to
99           check installed packages. This operation will check each dependency
100           specified and return a list of dependencies that are not currently
101           satisfied on the system. This operation accepts no other options.
102           Example usage: pacman -T qt "bash>=3.2".
103
104       -U, --upgrade
105           Upgrade or add package(s) to the system and install the required
106           dependencies from sync repositories. Either a URL or file path can
107           be specified. This is a “remove-then-add” process. See Upgrade
108           Options below; also see Handling Config Files for an explanation on
109           how pacman takes care of configuration files.
110
111       -F, --files
112           Query the files database. This operation allows you to look for
113           packages owning certain files or display files owned by certain
114           packages. Only packages that are part of your sync databases are
115           searched. See File Options below.
116
117       -V, --version
118           Display version and exit.
119
120       -h, --help
121           Display syntax for the given operation. If no operation was
122           supplied, then the general syntax is shown.
123

OPTIONS

125       -b, --dbpath <path>
126           Specify an alternative database location (a typical default is
127           /var/lib/pacman). This should not be used unless you know what you
128           are doing.  NOTE: If specified, this is an absolute path, and the
129           root path is not automatically prepended.
130
131       -r, --root <path>
132           Specify an alternative installation root (default is /). This
133           should not be used as a way to install software into /usr/local
134           instead of /usr. This option is used if you want to install a
135           package on a temporarily mounted partition that is "owned" by
136           another system.  NOTE: If database path or log file are not
137           specified on either the command line or in pacman.conf(5), their
138           default location will be inside this root path.
139
140       -v, --verbose
141           Output paths such as as the Root, Conf File, DB Path, Cache Dirs,
142           etc.
143
144       --arch <arch>
145           Specify an alternate architecture.
146
147       --cachedir <dir>
148           Specify an alternative package cache location (a typical default is
149           /var/cache/pacman/pkg). Multiple cache directories can be
150           specified, and they are tried in the order they are passed to
151           pacman.  NOTE: This is an absolute path, and the root path is not
152           automatically prepended.
153
154       --color <when>
155           Specify when to enable coloring. Valid options are always, never,
156           or auto.  always forces colors on; never forces colors off; and
157           auto only automatically enables colors when outputting onto a tty.
158
159       --config <file>
160           Specify an alternate configuration file.
161
162       --debug
163           Display debug messages. When reporting bugs, this option is
164           recommended to be used.
165
166       --gpgdir <dir>
167           Specify a directory of files used by GnuPG to verify package
168           signatures (a typical default is /etc/pacman.d/gnupg). This
169           directory should contain two files: pubring.gpg and trustdb.gpg.
170           pubring.gpg holds the public keys of all packagers.  trustdb.gpg
171           contains a so-called trust database, which specifies that the keys
172           are authentic and trusted.  NOTE: This is an absolute path, and the
173           root path is not automatically prepended.
174
175       --hookdir <dir>
176           Specify a alternative directory containing hook files (a typical
177           default is /etc/pacman.d/hooks). Multiple hook directories can be
178           specified with hooks in later directories taking precedence over
179           hooks in earlier directories.  NOTE: This is an absolute path, and
180           the root path is not automatically prepended.
181
182       --logfile <file>
183           Specify an alternate log file. This is an absolute path, regardless
184           of the installation root setting.
185
186       --noconfirm
187           Bypass any and all “Are you sure?” messages. It’s not a good idea
188           to do this unless you want to run pacman from a script.
189
190       --confirm
191           Cancels the effects of a previous --noconfirm.
192

TRANSACTION OPTIONS (APPLY TO -S, -R AND -U)

194       -d, --nodeps
195           Skips dependency version checks. Package names are still checked.
196           Normally, pacman will always check a package’s dependency fields to
197           ensure that all dependencies are installed and there are no package
198           conflicts in the system. Specify this option twice to skip all
199           dependency checks.
200
201       --assume-installed <package=version>
202           Add a virtual package "package" with version "version" to the
203           transaction to satisfy dependencies. This allows to disable
204           specific dependency checks without affecting all dependency checks.
205           To disable all dependency checking, see the --nodeps option.
206
207       --dbonly
208           Adds/removes the database entry only, leaving all files in place.
209
210       --noprogressbar
211           Do not show a progress bar when downloading files. This can be
212           useful for scripts that call pacman and capture the output.
213
214       --noscriptlet
215           If an install scriptlet exists, do not execute it. Do not use this
216           unless you know what you are doing.
217
218       -p, --print
219           Only print the targets instead of performing the actual operation
220           (sync, remove or upgrade). Use --print-format to specify how
221           targets are displayed. The default format string is "%l", which
222           displays URLs with -S, file names with -U, and pkgname-pkgver with
223           -R.
224
225       --print-format <format>
226           Specify a printf-like format to control the output of the --print
227           operation. The possible attributes are: "%n" for pkgname, "%v" for
228           pkgver, "%l" for location, "%r" for repository, and "%s" for size.
229           Implies --print.
230

UPGRADE OPTIONS (APPLY TO -S AND -U)

232       --force
233           Bypass file conflict checks and overwrite conflicting files. If the
234           package that is about to be installed contains files that are
235           already installed, this option will cause all those files to be
236           overwritten. Using --force will not allow overwriting a directory
237           with a file or installing packages with conflicting files and
238           directories. This option should be used with care, ideally not at
239           all.
240
241       --asdeps
242           Install packages non-explicitly; in other words, fake their install
243           reason to be installed as a dependency. This is useful for makepkg
244           and other build-from-source tools that need to install dependencies
245           before building the package.
246
247       --asexplicit
248           Install packages explicitly; in other words, fake their install
249           reason to be explicitly installed. This is useful if you want to
250           mark a dependency as explicitly installed so it will not be removed
251           by the --recursive remove operation.
252
253       --ignore <package>
254           Directs pacman to ignore upgrades of package even if there is one
255           available. Multiple packages can be specified by separating them
256           with a comma.
257
258       --ignoregroup <group>
259           Directs pacman to ignore upgrades of all packages in group, even if
260           there is one available. Multiple groups can be specified by
261           separating them with a comma.
262
263       --needed
264           Do not reinstall the targets that are already up-to-date.
265

QUERY OPTIONS

267       -c, --changelog
268           View the ChangeLog of a package if it exists.
269
270       -d, --deps
271           Restrict or filter output to packages installed as dependencies.
272           This option can be combined with -t for listing real orphans -
273           packages that were installed as dependencies but are no longer
274           required by any installed package.
275
276       -e, --explicit
277           Restrict or filter output to explicitly installed packages. This
278           option can be combined with -t to list explicitly installed
279           packages that are not required by any other package.
280
281       -g, --groups
282           Display all packages that are members of a named group. If a name
283           is not specified, list all grouped packages.
284
285       -i, --info
286           Display information on a given package. The -p option can be used
287           if querying a package file instead of the local database. Passing
288           two --info or -i flags will also display the list of backup files
289           and their modification states.
290
291       -k --check
292           Check that all files owned by the given package(s) are present on
293           the system. If packages are not specified or filter flags are not
294           provided, check all installed packages. Specifying this option
295           twice will perform more detailed file checking (including
296           permissions, file sizes, and modification times) for packages that
297           contain the needed mtree file.
298
299       -l, --list
300           List all files owned by a given package. Multiple packages can be
301           specified on the command line.
302
303       -m, --foreign
304           Restrict or filter output to packages that were not found in the
305           sync database(s). Typically these are packages that were downloaded
306           manually and installed with --upgrade.
307
308       -n, --native
309           Restrict or filter output to packages that are found in the sync
310           database(s). This is the inverse filter of --foreign.
311
312       -o, --owns <file>
313           Search for packages that own the specified file(s). The path can be
314           relative or absolute, and one or more files can be specified.
315
316       -p, --file
317           Signifies that the package supplied on the command line is a file
318           and not an entry in the database. The file will be decompressed and
319           queried. This is useful in combination with --info and --list.
320
321       -q, --quiet
322           Show less information for certain query operations. This is useful
323           when pacman’s output is processed in a script. Search will only
324           show package names and not version, group, and description
325           information; owns will only show package names instead of "file is
326           owned by pkg" messages; group will only show package names and omit
327           group names; list will only show files and omit package names;
328           check will only show pairs of package names and missing files; a
329           bare query will only show package names rather than names and
330           versions.
331
332       -s, --search <regexp>
333           Search each locally-installed package for names or descriptions
334           that match regexp. When including multiple search terms, only
335           packages with descriptions matching ALL of those terms are
336           returned.
337
338       -t, --unrequired
339           Restrict or filter output to packages not required or optionally
340           required by any currently installed package. Specify this option
341           twice to only filter packages that are direct dependencies (i.e. do
342           not filter optional dependencies).
343
344       -u, --upgrades
345           Restrict or filter output to packages that are out-of-date on the
346           local system. Only package versions are used to find outdated
347           packages; replacements are not checked here. This option works best
348           if the sync database is refreshed using -Sy.
349

REMOVE OPTIONS

351       -c, --cascade
352           Remove all target packages, as well as all packages that depend on
353           one or more target packages. This operation is recursive and must
354           be used with care, since it can remove many potentially needed
355           packages.
356
357       -n, --nosave
358           Instructs pacman to ignore file backup designations. Normally, when
359           a file is removed from the system, the database is checked to see
360           if the file should be renamed with a .pacsave extension.
361
362       -s, --recursive
363           Remove each target specified including all of their dependencies,
364           provided that (A) they are not required by other packages; and (B)
365           they were not explicitly installed by the user. This operation is
366           recursive and analogous to a backwards --sync operation, and it
367           helps keep a clean system without orphans. If you want to omit
368           condition (B), pass this option twice.
369
370       -u, --unneeded
371           Removes targets that are not required by any other packages. This
372           is mostly useful when removing a group without using the -c option,
373           to avoid breaking any dependencies.
374

SYNC OPTIONS

376       -c, --clean
377           Remove packages that are no longer installed from the cache as well
378           as currently unused sync databases to free up disk space. When
379           pacman downloads packages, it saves them in a cache directory. In
380           addition, databases are saved for every sync DB you download from
381           and are not deleted even if they are removed from the configuration
382           file pacman.conf(5). Use one --clean switch to only remove packages
383           that are no longer installed; use two to remove all files from the
384           cache. In both cases, you will have a yes or no option to remove
385           packages and/or unused downloaded databases.
386
387           If you use a network shared cache, see the CleanMethod option in
388           pacman.conf(5).
389
390       -g, --groups
391           Display all the members for each package group specified. If no
392           group names are provided, all groups will be listed; pass the flag
393           twice to view all groups and their members.
394
395       -i, --info
396           Display information on a given sync database package. Passing two
397           --info or -i flags will also display those packages in all
398           repositories that depend on this package.
399
400       -l, --list
401           List all packages in the specified repositories. Multiple
402           repositories can be specified on the command line.
403
404       -q, --quiet
405           Show less information for certain sync operations. This is useful
406           when pacman’s output is processed in a script. Search will only
407           show package names and not repository, version, group, and
408           description information; list will only show package names and omit
409           databases and versions; group will only show package names and omit
410           group names.
411
412       -s, --search <regexp>
413           This will search each package in the sync databases for names or
414           descriptions that match regexp. When you include multiple search
415           terms, only packages with descriptions matching ALL of those terms
416           will be returned.
417
418       -u, --sysupgrade
419           Upgrades all packages that are out-of-date. Each
420           currently-installed package will be examined and upgraded if a
421           newer package exists. A report of all packages to upgrade will be
422           presented, and the operation will not proceed without user
423           confirmation. Dependencies are automatically resolved at this level
424           and will be installed/upgraded if necessary.
425
426           Pass this option twice to enable package downgrades; in this case,
427           pacman will select sync packages whose versions do not match with
428           the local versions. This can be useful when the user switches from
429           a testing repository to a stable one.
430
431           Additional targets can also be specified manually, so that -Su foo
432           will do a system upgrade and install/upgrade the "foo" package in
433           the same operation.
434
435       -w, --downloadonly
436           Retrieve all packages from the server, but do not install/upgrade
437           anything.
438
439       -y, --refresh
440           Download a fresh copy of the master package database from the
441           server(s) defined in pacman.conf(5). This should typically be used
442           each time you use --sysupgrade or -u. Passing two --refresh or -y
443           flags will force a refresh of all package databases, even if they
444           appear to be up-to-date.
445

DATABASE OPTIONS

447       --asdeps <package>
448           Mark a package as non-explicitly installed; in other words, set
449           their install reason to be installed as a dependency.
450
451       --asexplicit <package>
452           Mark a package as explicitly installed; in other words, set their
453           install reason to be explicitly installed. This is useful it you
454           want to keep a package installed even when it was initially
455           installed as a dependency of another package.
456
457       -k --check
458           Check the local package database is internally consistent. This
459           will check all required files are present and that installed
460           packages have the required dependencies, do not conflict and that
461           multiple packages do not own the same file. Specifying this option
462           twice will perform a check on the sync databases to ensure all
463           specified dependencies are available.
464

FILE OPTIONS

466       -y, --refresh
467           Download fresh package databases from the server. Use twice to
468           force a refresh even if databases are up to date.
469
470       -l, --list
471           List the files owned by the queried package.
472
473       -s, --search
474           Search package file names for matching strings.
475
476       -x, --regex
477           Treat arguments to --search as regular expressions.
478
479       -o, --owns
480           Search for packages that own a particular file.
481
482       -q, --quiet
483           Show less information for certain file operations. This is useful
484           when pacman’s output is processed in a script, however, you may
485           want to use --machinereadable instead.
486
487       --machinereadable
488           Use a machine readable output format for --list, --search and
489           --owns. The format is repository\0pkgname\0pkgver\0path\n with \0
490           being the NULL character and \n a linefeed.
491

HANDLING CONFIG FILES

493       Pacman uses the same logic as rpm to determine action against files
494       that are designated to be backed up. During an upgrade, three MD5
495       hashes are used for each backup file to determine the required action:
496       one for the original file installed, one for the new file that is about
497       to be installed, and one for the actual file existing on the file
498       system. After comparing these three hashes, the follow scenarios can
499       result:
500
501       original=X, current=X, new=X
502           All three files are the same, so overwrites are not an issue.
503           Install the new file.
504
505       original=X, current=X, new=Y
506           The current file is the same as the original, but the new one
507           differs. Since the user did not ever modify the file, and the new
508           one may contain improvements or bug fixes, install the new file.
509
510       original=X, current=Y, new=X
511           Both package versions contain the exact same file, but the one on
512           the file system has been modified. Leave the current file in place.
513
514       original=X, current=Y, new=Y
515           The new file is identical to the current file. Install the new
516           file.
517
518       original=X, current=Y, new=Z
519           All three files are different, so install the new file with a
520           .pacnew extension and warn the user. The user must then manually
521           merge any necessary changes into the original file.
522
523       original=NULL, current=Y, new=Z
524           The package was not previously installed, and the file already
525           exists on the file system. Install the new file with a .pacnew
526           extension and warn the user. The user must then manually merge any
527           necessary changes into the original file.
528

EXAMPLES

530       pacman -Ss ne.hack
531           Search for regexp "ne.hack" in package database.
532
533       pacman -S gpm
534           Download and install gpm including dependencies.
535
536       pacman -U /home/user/ceofhack-0.6-1-x86_64.pkg.tar.gz
537           Install ceofhack-0.6-1 package from a local file.
538
539       pacman -Syu
540           Update package list and upgrade all packages afterwards.
541
542       pacman -Syu gpm
543           Update package list, upgrade all packages, and then install gpm if
544           it wasn’t already installed.
545

CONFIGURATION

547       See pacman.conf(5) for more details on configuring pacman using the
548       pacman.conf file.
549

SEE ALSO

551       alpm-hooks(5), libalpm(3), makepkg(8), pacman.conf(5)
552
553       See the pacman website at https://www.archlinux.org/pacman/ for current
554       information on pacman and its related tools.
555

BUGS

557       Bugs? You must be kidding; there are no bugs in this software. But if
558       we happen to be wrong, send us an email with as much detail as possible
559       to pacman-dev@archlinux.org.
560

AUTHORS

562       Current maintainers:
563
564       ·   Allan McRae <allan@archlinux.org>
565
566       ·   Andrew Gregory <andrew.gregory.8@gmail.com>
567
568       ·   Dan McGee <dan@archlinux.org>
569
570       ·   Dave Reisner <dreisner@archlinux.org>
571
572       Past major contributors:
573
574       ·   Judd Vinet <jvinet@zeroflux.org>
575
576       ·   Aurelien Foret <aurelien@archlinux.org>
577
578       ·   Aaron Griffin <aaron@archlinux.org>
579
580       ·   Xavier Chantry <shiningxc@gmail.com>
581
582       ·   Nagy Gabor <ngaba@bibl.u-szeged.hu>
583
584       For additional contributors, use git shortlog -s on the pacman.git
585       repository.
586
587
588
589Pacman 5.0.2                      2018-07-14                         PACMAN(8)
Impressum