pacman.8.asciidoc 23.2 KB
Newer Older
1
pacman(8)
2
3
=========

4
Name
5
6
7
8
----
pacman - package manager utility


9
Synopsis
10
--------
11
'pacman' <operation> [options] [targets]
12

13

14
Description
15
16
17
-----------
Pacman is a package management utility that tracks installed packages on a Linux
system. It features dependency support, package groups, install and uninstall
Allan McRae's avatar
Allan McRae committed
18
scripts, and the ability to sync your local machine with a remote repository to
19
20
automatically upgrade packages. Pacman packages are a zipped tar format.

Jason St. John's avatar
Jason St. John committed
21
Since version 3.0.0, pacman has been the front-end to linkman:libalpm[3], the
22
``Arch Linux Package Management'' library. This library allows alternative
Jason St. John's avatar
Jason St. John committed
23
front-ends to be written (for instance, a GUI front-end).
24

25
Invoking pacman involves specifying an operation with any potential options and
Jason St. John's avatar
Jason St. John committed
26
targets to operate on. A 'target' is usually a package name, file name, URL, or
27
a search string. Targets can be provided as command line arguments.
Jason St. John's avatar
Jason St. John committed
28
Additionally, if stdin is not from a terminal and a single hyphen (-) is passed
29
as an argument, targets will be read from stdin.
30

31

32
Operations
33
----------
Nagy Gabor's avatar
Nagy Gabor committed
34
*-D, \--database*::
35
36
37
38
	Operate on the package database. This operation allows you to modify
	certain attributes of the installed packages in pacman's database. It
	also allows you to check the databases for internal consistency.
	See <<DO,Database Options>> below.
Nagy Gabor's avatar
Nagy Gabor committed
39

Dan McGee's avatar
Dan McGee committed
40
*-Q, \--query*::
41
42
43
44
	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
Jason St. John's avatar
Jason St. John committed
45
	individual package files. In the first case, if no package names
Nagy Gabor's avatar
Nagy Gabor committed
46
47
48
	are provided in the command line, all installed packages will be
	queried. Additionally, various filters can be applied on the package
	list. See <<QO,Query Options>> below.
49

Dan McGee's avatar
Dan McGee committed
50
*-R, \--remove*::
51
	Remove package(s) from the system. Groups can also be specified to be
Nathan Jones's avatar
Nathan Jones committed
52
53
54
	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
Dan McGee's avatar
Dan McGee committed
55
	with a '.pacsave' extension unless the '\--nosave' option is used.
Nathan Jones's avatar
Nathan Jones committed
56
	See <<RO,Remove Options>> below.
57

Dan McGee's avatar
Dan McGee committed
58
*-S, \--sync*::
Jason St. John's avatar
Jason St. John committed
59
60
	Synchronize packages. Packages are installed directly from the remote
	repositories, including all dependencies required to run the packages. For
61
	example, `pacman -S qt` will download and install qt and all the
Jason St. John's avatar
Jason St. John committed
62
63
64
65
66
	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.
Nathan Jones's avatar
Nathan Jones committed
67
68
+
In addition to packages, groups can be specified as well. For example, if
69
70
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.
Jason St. John's avatar
Jason St. John committed
71
The package selection is specified using a space- and/or comma-separated list of
72
73
74
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 (`^`).
Nathan Jones's avatar
Nathan Jones committed
75
+
76
77
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
Nathan Jones's avatar
Nathan Jones committed
78
provide the same functionality as foo will be searched for. If any package is
79
80
found, it will be installed. A selection prompt is provided if multiple packages
providing foo are found.
Nathan Jones's avatar
Nathan Jones committed
81
+
Jason St. John's avatar
Jason St. John committed
82
You can also use `pacman -Su` to upgrade all packages that are out-of-date. See
83
84
85
86
<<SO,Sync Options>> below. When upgrading, pacman performs version comparison
to determine which packages need upgrading. This behavior operates as follows:

  Alphanumeric:
87
    1.0a < 1.0b < 1.0beta < 1.0p < 1.0pre < 1.0rc < 1.0 < 1.0.a < 1.0.1
88
89
  Numeric:
    1 < 1.0 < 1.1 < 1.1.1 < 1.2 < 2.0 < 3.0.0
90
+
Dan McGee's avatar
Dan McGee committed
91
Additionally, version strings can have an 'epoch' value defined that will
Jason St. John's avatar
Jason St. John committed
92
overrule any version comparison, unless the epoch values are equal. This is
Dan McGee's avatar
Dan McGee committed
93
94
specified in an `epoch:version-rel` format. For example, `2:1.0-1` is always
greater than `1:3.6-1`.
95

Nagy Gabor's avatar
Nagy Gabor committed
96
97
98
*-T, \--deptest*::
	Check dependencies; this is useful in scripts such as makepkg to check
	installed packages. This operation will check each dependency specified and
99
	return a list of dependencies that are not currently satisfied on the system.
Nagy Gabor's avatar
Nagy Gabor committed
100
101
102
	This operation accepts no other options. Example usage: `pacman -T qt
	"bash>=3.2"`.

Dan McGee's avatar
Dan McGee committed
103
*-U, \--upgrade*::
104
	Upgrade or add package(s) to the system and install the required
Jason St. John's avatar
Jason St. John committed
105
	dependencies from sync repositories. Either a URL or file path can be
106
107
	specified. This is a ``remove-then-add'' process. See <<UO,Upgrade
	Options>> below; also see <<HCF,Handling Config Files>> for an explanation
Jason St. John's avatar
Jason St. John committed
108
	on how pacman takes care of configuration files.
109

Florian Pritz's avatar
Florian Pritz committed
110
111
112
113
114
115
*-F, \--files*::
	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
	<<FO,File Options>> below.

Dan McGee's avatar
Dan McGee committed
116
*-V, \--version*::
117
118
	Display version and exit.

Dan McGee's avatar
Dan McGee committed
119
*-h, \--help*::
Jason St. John's avatar
Jason St. John committed
120
	Display syntax for the given operation. If no operation was supplied,
121
122
123
	then the general syntax is shown.


124
Options
125
-------
Dan McGee's avatar
Dan McGee committed
126
*-b, \--dbpath* <path>::
127
	Specify an alternative database location (the default is
Jason St. John's avatar
Jason St. John committed
128
129
	+{localstatedir}/lib/pacman+). This should not be used unless you know what
	you are doing.
130
	*NOTE*: If specified, this is an absolute path, and the root path is
131
	not automatically prepended.
132

133
*-r, \--root* <path>::
134
	Specify an alternative installation root (default is +{rootdir}+). This should
135
136
137
138
139
140
141
142
	not be used as a way to install software into `/usr/local` instead of
	`/usr`.
	*NOTE*: If database path or log file are not specified on either the
	command line or in linkman:pacman.conf[5], their default location will
	be inside this root path.
	*NOTE*: This option is not suitable for performing operations on a mounted
	guest system. See '\--sysroot' instead.

Nagy Gabor's avatar
Nagy Gabor committed
143
*-v, \--verbose*::
Eli Schwartz's avatar
Eli Schwartz committed
144
	Output paths such as the Root, Conf File, DB Path, Cache Dirs, etc.
145

Dan McGee's avatar
Dan McGee committed
146
*\--arch* <arch>::
147
	Specify an alternate architecture.
Nagy Gabor's avatar
Nagy Gabor committed
148

Dan McGee's avatar
Dan McGee committed
149
*\--cachedir* <dir>::
150
	Specify an alternative package cache location (the default is
Jason St. John's avatar
Jason St. John committed
151
152
153
154
	+{localstatedir}/cache/pacman/pkg+). Multiple cache directories can be
	specified, and they are tried in the order they are passed to pacman.
	*NOTE*: This is an absolute path, and the root path is not automatically
	prepended.
155

156
*\--color* <when>::
Jason St. John's avatar
Jason St. John committed
157
158
159
	Specify when to enable coloring. Valid options are 'always', 'never', or
	'auto'. 'always' forces colors on; 'never' forces colors off; and 'auto' only
	automatically enables colors when outputting onto a tty.
160

Dan McGee's avatar
Dan McGee committed
161
*\--config* <file>::
162
163
	Specify an alternate configuration file.

164
165
166
*\--debug*::
	Display debug messages. When reporting bugs, this option is recommended
	to be used.
167

168
*\--gpgdir* <dir>::
169
170
	Specify a directory of files used by GnuPG to verify package signatures
	(the default is +{sysconfdir}/pacman.d/gnupg+). This directory should contain
171
172
	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
Jason St. John's avatar
Jason St. John committed
173
174
	specifies that the keys are authentic and trusted. *NOTE*: This is an absolute
	path, and the root path is not automatically prepended.
175

Allan McRae's avatar
Allan McRae committed
176
*\--hookdir* <dir>::
177
	Specify a alternative directory containing hook files (the default is
Allan McRae's avatar
Allan McRae committed
178
179
180
181
182
	+{sysconfdir}/pacman.d/hooks+). Multiple hook directories can be specified
	with hooks in later directories taking precedence over hooks in earlier
	directories. *NOTE*: This is an absolute path, and the root path is not
	automatically prepended.

Dan McGee's avatar
Dan McGee committed
183
*\--logfile* <file>::
Dan McGee's avatar
Dan McGee committed
184
185
186
	Specify an alternate log file. This is an absolute path, regardless of
	the installation root setting.

Dan McGee's avatar
Dan McGee committed
187
*\--noconfirm*::
188
	Bypass any and all ``Are you sure?'' messages. It's not a good idea to do
189
190
	this unless you want to run pacman from a script.

Andrew Gregory's avatar
Andrew Gregory committed
191
192
193
*\--confirm*::
	Cancels the effects of a previous '\--noconfirm'.

194
195
196
197
*\--disable-download-timeout*::
	Disable defaults for low speed limit and timeout on downloads. Use this
	if you have issues downloading files with proxy and/or security gateway.

Andrew Gregory's avatar
Andrew Gregory committed
198
199
200
201
202
203
*\--sysroot* <dir>::
	Specify an alternative system root.  Pacman will chroot and chdir into the
	system root prior to running. This allows mounted guest systems to be
	properly operated on. Any other paths given will be interpreted as relative
	to the system root. Requires root privileges.

204

205
206
207
Transaction Options (apply to '-S', '-R' and '-U')
--------------------------------------------------
*-d, \--nodeps*::
208
209
210
211
	Skips dependency version checks. Package names are still checked. Normally,
	pacman will always check a package's 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.
212

Florian Pritz's avatar
Florian Pritz committed
213
214
215
216
217
218
*\--assume-installed* <package=version>::
	Add a virtual package "package" with version "version" to the transaction
	to satisfy dependencies. This allows to disable specific dependency checks
	without affecting all dependency checks. To disable all dependency
	checking, see the '\--nodeps' option.

219
*\--dbonly*::
Jason St. John's avatar
Jason St. John committed
220
	Adds/removes the database entry only, leaving all files in place.
221

Dan McGee's avatar
Dan McGee committed
222
*\--noprogressbar*::
223
224
225
	Do not show a progress bar when downloading files. This can be useful
	for scripts that call pacman and capture the output.

Dan McGee's avatar
Dan McGee committed
226
*\--noscriptlet*::
227
228
229
	If an install scriptlet exists, do not execute it. Do not use this
	unless you know what you are doing.

230
231
*-p, \--print*::
	Only print the targets instead of performing the actual operation (sync,
232
	remove or upgrade). Use '\--print-format' to specify how targets are
233
	displayed. The default format string is "%l", which displays URLs with
Jason St. John's avatar
Jason St. John committed
234
	'-S', file names with '-U', and pkgname-pkgver with '-R'.
235

Dan McGee's avatar
Dan McGee committed
236
*\--print-format* <format>::
237
	Specify a printf-like format to control the output of the '\--print'
238
239
	operation. The possible attributes are: "%n" for pkgname, "%v" for pkgver,
	"%l" for location, "%r" for repository, and "%s" for size. Implies '\--print'.
240

241

242
Upgrade Options (apply to '-S' and '-U')[[UO]]
243
----------------------------------------------
244
245
246
*\--asdeps*::
	Install packages non-explicitly; in other words, fake their install reason
	to be installed as a dependency. This is useful for makepkg and other
Jason St. John's avatar
Jason St. John committed
247
	build-from-source tools that need to install dependencies before building
248
249
250
251
252
253
254
255
	the package.

*\--asexplicit*::
	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 '\--recursive'
	remove operation.

Dan McGee's avatar
Dan McGee committed
256
*\--ignore* <package>::
257
258
259
260
	Directs pacman to ignore upgrades of package even if there is one
	available. Multiple packages can be specified by separating them
	with a comma.

Dan McGee's avatar
Dan McGee committed
261
*\--ignoregroup* <group>::
Jason St. John's avatar
Jason St. John committed
262
	Directs pacman to ignore upgrades of all packages in 'group', even if
263
264
	there is one available. Multiple groups can be specified by
	separating them with a comma.
265

266
*\--needed*::
Jason St. John's avatar
Jason St. John committed
267
	Do not reinstall the targets that are already up-to-date.
268

269
270
271
272
273
274
275
276
277
278
279
280
*\--overwrite* <glob>::
	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 'glob', this option will cause all those files to be
	overwritten.  Using '\--overwrite' 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.

281

282
283
Query Options (apply to '-Q')[[QO]]
-----------------------------------
Dan McGee's avatar
Dan McGee committed
284
*-c, \--changelog*::
285
	View the ChangeLog of a package if it exists.
286

287
*-d, \--deps*::
Nagy Gabor's avatar
Nagy Gabor committed
288
	Restrict or filter output to packages installed as dependencies. This
289
	option can be combined with '-t' for listing real orphans - packages that
Nagy Gabor's avatar
Nagy Gabor committed
290
	were installed as dependencies but are no longer required by any
291
	installed package.
292
293

*-e, \--explicit*::
294
	Restrict or filter output to explicitly installed packages. This option
295
	can be combined with '-t' to list explicitly installed packages that
296
	are not required by any other package.
297

Dan McGee's avatar
Dan McGee committed
298
*-g, \--groups*::
Dan McGee's avatar
Dan McGee committed
299
	Display all packages that are members of a named group. If a name is not
300
301
	specified, list all grouped packages.

Dan McGee's avatar
Dan McGee committed
302
303
*-i, \--info*::
	Display information on a given package. The '-p' option can be used if
Chantry Xavier's avatar
Chantry Xavier committed
304
305
306
	querying a package file instead of the local database. Passing two
	'\--info' or '-i' flags will also display the list of backup files and
	their modification states.
307

308
*-k, \--check*::
Dan McGee's avatar
Dan McGee committed
309
310
	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,
Jason St. John's avatar
Jason St. John committed
311
312
	check all installed packages. Specifying this option twice will perform
	more detailed file checking (including permissions, file sizes, and
Allan McRae's avatar
Allan McRae committed
313
	modification times) for packages that contain the needed mtree file.
Dan McGee's avatar
Dan McGee committed
314

Dan McGee's avatar
Dan McGee committed
315
*-l, \--list*::
316
317
318
	List all files owned by a given package. Multiple packages can be
	specified on the command line.

Dan McGee's avatar
Dan McGee committed
319
*-m, \--foreign*::
320
	Restrict or filter output to packages that were not found in the sync
Jason St. John's avatar
Jason St. John committed
321
	database(s). Typically these are packages that were downloaded manually
322
	and installed with '\--upgrade'.
323

324
325
*-n, \--native*::
	Restrict or filter output to packages that are found in the sync
Jason St. John's avatar
Jason St. John committed
326
	database(s). This is the inverse filter of '\--foreign'.
327

Dan McGee's avatar
Dan McGee committed
328
*-o, \--owns* <file>::
329
	Search for packages that own the specified file(s). The path can be
Jason St. John's avatar
Jason St. John committed
330
	relative or absolute, and one or more files can be specified.
331

Dan McGee's avatar
Dan McGee committed
332
*-p, \--file*::
333
334
	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.
Dan McGee's avatar
Dan McGee committed
335
	This is useful in combination with '\--info' and '\--list'.
336

337
*-q, \--quiet*::
Jason St. John's avatar
Jason St. John committed
338
339
	Show less information for certain query operations. This is useful when
	pacman's output is processed in a script. Search will only show package
Nagy Gabor's avatar
Nagy Gabor committed
340
	names and not version, group, and description information; owns will
341
342
	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
Dan McGee's avatar
Dan McGee committed
343
344
	files and omit package names; check will only show pairs of package names
	and missing files; a bare query will only show package names
345
	rather than names and versions.
346

Dan McGee's avatar
Dan McGee committed
347
*-s, \--search* <regexp>::
348
349
350
	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.
Dan McGee's avatar
Dan McGee committed
351

352
*-t, \--unrequired*::
353
354
355
356
	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.
357

Dan McGee's avatar
Dan McGee committed
358
*-u, \--upgrades*::
Jason St. John's avatar
Jason St. John committed
359
360
361
	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
Nagy Gabor's avatar
Nagy Gabor committed
362
	database is refreshed using '-Sy'.
363
364


365
366
Remove Options (apply to '-R')[[RO]]
------------------------------------
Dan McGee's avatar
Dan McGee committed
367
*-c, \--cascade*::
368
	Remove all target packages, as well as all packages that depend on one
Jason St. John's avatar
Jason St. John committed
369
370
	or more target packages. This operation is recursive and must be used
	with care, since it can remove many potentially needed packages.
371

Dan McGee's avatar
Dan McGee committed
372
*-n, \--nosave*::
373
	Instructs pacman to ignore file backup designations. Normally, when a
Jason St. John's avatar
Jason St. John committed
374
	file is removed from the system, the database is checked to see if the
Dan McGee's avatar
Dan McGee committed
375
	file should be renamed with a '.pacsave' extension.
376

Dan McGee's avatar
Dan McGee committed
377
*-s, \--recursive*::
378
379
380
	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
Jason St. John's avatar
Jason St. John committed
381
	to a backwards '\--sync' operation, and it helps keep a clean system without
Nagy Gabor's avatar
Nagy Gabor committed
382
	orphans. If you want to omit condition (B), pass this option twice.
383

384
*-u, \--unneeded*::
385
	Removes targets that are not required by any other packages.
386
387
388
	This is mostly useful when removing a group without using the '-c' option,
	to avoid breaking any dependencies.

389

390
391
Sync Options (apply to '-S')[[SO]]
----------------------------------
Dan McGee's avatar
Dan McGee committed
392
*-c, \--clean*::
Chantry Xavier's avatar
Chantry Xavier committed
393
394
395
	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,
Jason St. John's avatar
Jason St. John committed
396
	databases are saved for every sync DB you download from and are not
Chantry Xavier's avatar
Chantry Xavier committed
397
398
	deleted even if they are removed from the configuration file
	linkman:pacman.conf[5]. Use one '\--clean' switch to only remove
399
	packages that are no longer installed; use two to remove all files
Chantry Xavier's avatar
Chantry Xavier committed
400
401
	from the cache. In both cases, you will have a yes or no option to
	remove packages and/or unused downloaded databases.
Chantry Xavier's avatar
Chantry Xavier committed
402
403
404
+
If you use a network shared cache, see the 'CleanMethod' option in
linkman:pacman.conf[5].
405

Dan McGee's avatar
Dan McGee committed
406
*-g, \--groups*::
407
408
409
410
	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.

Dan McGee's avatar
Dan McGee committed
411
*-i, \--info*::
412
413
414
	Display information on a given sync database package. Passing two '\--info'
	or '-i' flags will also display those packages in all repositories that
	depend on this package.
415

Dan McGee's avatar
Dan McGee committed
416
*-l, \--list*::
417
418
419
	List all packages in the specified repositories. Multiple repositories
	can be specified on the command line.

420
*-q, \--quiet*::
Jason St. John's avatar
Jason St. John committed
421
422
423
	Show less information for certain sync operations. This is useful when
	pacman's output is processed in a script. Search will only show package
	names and not repository, version, group, and description information; list
Nagy Gabor's avatar
Nagy Gabor committed
424
425
	will only show package names and omit databases and versions; group will
	only show package names and omit group names.
426

Dan McGee's avatar
Dan McGee committed
427
*-s, \--search* <regexp>::
428
	This will search each package in the sync databases for names or
429
430
431
	descriptions that match `regexp`. When you include multiple search
	terms, only packages with descriptions matching ALL of those terms will
	be returned.
432

Dan McGee's avatar
Dan McGee committed
433
*-u, \--sysupgrade*::
Jason St. John's avatar
Jason St. John committed
434
	Upgrades all packages that are out-of-date. Each currently-installed
435
	package will be examined and upgraded if a newer package exists. A
Jason St. John's avatar
Jason St. John committed
436
	report of all packages to upgrade will be presented, and the operation
437
438
	will not proceed without user confirmation. Dependencies are
	automatically resolved at this level and will be installed/upgraded if
439
440
	necessary.
+
Jason St. John's avatar
Jason St. John committed
441
442
443
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.
444
445
+
Additional targets can also be specified manually, so that '-Su foo' will do a
446
system upgrade and install/upgrade the "foo" package in the same operation.
447

Dan McGee's avatar
Dan McGee committed
448
*-w, \--downloadonly*::
449
	Retrieve all packages from the server, but do not install/upgrade anything.
450

Dan McGee's avatar
Dan McGee committed
451
*-y, \--refresh*::
452
	Download a fresh copy of the master package database from the server(s)
453
	defined in linkman:pacman.conf[5]. This should typically be used each time
454
	you use	'\--sysupgrade' or '-u'. Passing two '\--refresh' or '-y' flags
455
456
	will force a refresh of all package databases, even if they appear to be
	up-to-date.
457
458


459
460
Database Options (apply to '-D')[[QO]]
--------------------------------------
461
462
463
464
*\--asdeps* <package>::
	Mark a package as non-explicitly installed; in other words, set their install
	reason to be installed as a dependency.

465
*\--asexplicit* <package>::
466
	Mark a package as explicitly installed; in other words, set their install
Allan McRae's avatar
Allan McRae committed
467
	reason to be explicitly installed. This is useful if you want to keep a
468
469
470
	package installed even when it was initially installed as a dependency
	of another package.

471
*-k, \--check*::
472
473
474
475
476
477
478
	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.

479
*-q, \--quiet*::
Allan McRae's avatar
Allan McRae committed
480
	Suppress messages on successful completion of database operations.
481

482
483
File Options (apply to '-F')[[FO]]
----------------------------------
Florian Pritz's avatar
Florian Pritz committed
484
485
486
487
488
489
490
491
*-y, --refresh*::
	Download fresh package databases from the server. Use twice to force a
	refresh even if databases are up to date.

*-l, \--list*::
	List the files owned by the queried package.

*-x, --regex*::
Morgan Adamiec's avatar
Morgan Adamiec committed
492
	Interpret each query as a regular expression.
Florian Pritz's avatar
Florian Pritz committed
493
494
495
496
497

*-q, \--quiet*::
	Show less information for certain file operations. This is useful when
	pacman's output is processed in a script, however, you may want to use
	'--machinereadable' instead.
498

499
*--machinereadable*::
Morgan Adamiec's avatar
Morgan Adamiec committed
500
501
502
	Print each match in a machine readable output format. The format is
	'repository\0pkgname\0pkgver\0path\n' with '\0' being the NULL character
	and '\n' a linefeed.
503

504
505
Handling Config Files[[HCF]]
----------------------------
Jason St. John's avatar
Jason St. John committed
506
507
508
509
510
Pacman uses the same logic as 'rpm' 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
Allan McRae's avatar
Allan McRae committed
511
following scenarios can result:
512
513

original=X, current=X, new=X::
514
	All three files are the same, so overwrites are not an issue. Install the
515
516
517
	new file.

original=X, current=X, new=Y::
Jason St. John's avatar
Jason St. John committed
518
	The current file is the same as the original, but the new one differs.
519
	Since the user did not ever modify the file, and the new one may contain
Jason St. John's avatar
Jason St. John committed
520
	improvements or bug fixes, install the new file.
521
522
523

original=X, current=Y, new=X::
	Both package versions contain the exact same file, but the one on the
Jason St. John's avatar
Jason St. John committed
524
	file system has been modified. Leave the current file in place.
525
526
527
528
529

original=X, current=Y, new=Y::
	The new file is identical to the current file. Install the new file.

original=X, current=Y, new=Z::
Dan McGee's avatar
Dan McGee committed
530
	All three files are different, so install the new file with a '.pacnew'
531
532
533
	extension and warn the user. The user must then manually merge any
	necessary changes into the original file.

534
original=NULL, current=Y, new=Z::
Jason St. John's avatar
Jason St. John committed
535
	The package was not previously installed, and the file already exists on the
536
537
538
	file system. Install the new file with a '.pacnew' extension and warn the
	user. The user must then manually merge any necessary changes into the
	original file.
539

540

541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
Examples
--------

pacman -Ss ne.hack::
	Search for regexp "ne.hack" in package database.

pacman -S gpm::
	Download and install gpm including dependencies.

pacman -U /home/user/ceofhack-0.6-1-x86_64.pkg.tar.gz::
	Install ceofhack-0.6-1 package from a local file.

pacman -Syu::
	Update package list and upgrade all packages afterwards.

pacman -Syu gpm::
	Update package list, upgrade all packages, and then install gpm if it
	wasn't already installed.

560

561
562
Configuration
-------------
563
See linkman:pacman.conf[5] for more details on configuring pacman using the
Dan McGee's avatar
Dan McGee committed
564
'pacman.conf' file.
565
566
567
568


See Also
--------
569
570
linkman:alpm-hooks[5], linkman:libalpm[3], linkman:makepkg[8],
linkman:pacman.conf[5]
571

572
include::footer.asciidoc[]