Debian Codegraph @

upstream/debian-trixie/man8/pacman.8

raw
1 '\" t
2 .\" Title: pacman
3 .\" Author: [see the "Authors" section]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\" Date: 2025-01-20
6 .\" Manual: Pacman Manual
7 .\" Source: Pacman 7.0.0
8 .\" Language: English
9 .\"
10 .TH "PACMAN" "8" "2025\-01\-20" "Pacman 7\&.0\&.0" "Pacman Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 pacman \- package manager utility
32 .SH "SYNOPSIS"
33 .sp
34 \fIpacman\fR <operation> [options] [targets]
35 .SH "DESCRIPTION"
36 .sp
37 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\&.
38 .sp
39 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)\&.
40 .sp
41 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\&.
42 .SH "OPERATIONS"
43 .PP
44 \fB\-D, \-\-database\fR
45 .RS 4
46 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
47 Database Options
48 below\&.
49 .RE
50 .PP
51 \fB\-Q, \-\-query\fR
52 .RS 4
53 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
54 Query Options
55 below\&.
56 .RE
57 .PP
58 \fB\-R, \-\-remove\fR
59 .RS 4
60 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
61 \fI\&.pacsave\fR
62 extension unless the
63 \fI\-\-nosave\fR
64 option is used\&. See
65 Remove Options
66 below\&.
67 .RE
68 .PP
69 \fB\-S, \-\-sync\fR
70 .RS 4
71 Synchronize packages\&. Packages are installed directly from the remote repositories, including all dependencies required to run the packages\&. For example,
72 pacman \-S qt
73 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:
74 pacman \-S testing/qt\&. You can also specify version requirements:
75 pacman \-S "bash>=3\&.2"\&. Quotes are needed, otherwise the shell interprets ">" as redirection to a file\&.
76 .sp
77 In addition to packages, groups can be specified as well\&. For example, if gnome is a defined package group, then
78 pacman \-S gnome
79 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 (^)\&.
80 .sp
81 Packages that provide other packages are also handled\&. For example,
82 pacman \-S foo
83 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\&.
84 .sp
85 You can also use
86 pacman \-Su
87 to upgrade all packages that are out\-of\-date\&. See
88 Sync Options
89 below\&. When upgrading, pacman performs version comparison to determine which packages need upgrading\&. This behavior operates as follows:
90 .sp
91 .if n \{\
92 .RS 4
93 .\}
94 .nf
95 Alphanumeric:
96 1\&.0a < 1\&.0b < 1\&.0beta < 1\&.0p < 1\&.0pre < 1\&.0rc < 1\&.0 < 1\&.0\&.a < 1\&.0\&.1
97 Numeric:
98 1 < 1\&.0 < 1\&.1 < 1\&.1\&.1 < 1\&.2 < 2\&.0 < 3\&.0\&.0
99 .fi
100 .if n \{\
101 .RE
102 .\}
103 .sp
104 Additionally, version strings can have an
105 \fIepoch\fR
106 value defined that will overrule any version comparison, unless the epoch values are equal\&. This is specified in an
107 epoch:version\-rel
108 format\&. For example,
109 2:1\&.0\-1
110 is always greater than
111 1:3\&.6\-1\&.
112 .RE
113 .PP
114 \fB\-T, \-\-deptest\fR
115 .RS 4
116 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:
117 pacman \-T qt "bash>=3\&.2"\&.
118 .RE
119 .PP
120 \fB\-U, \-\-upgrade\fR
121 .RS 4
122 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
123 Upgrade Options
124 below; also see
125 Handling Config Files
126 for an explanation on how pacman takes care of configuration files\&.
127 .RE
128 .PP
129 \fB\-F, \-\-files\fR
130 .RS 4
131 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
132 File Options
133 below\&.
134 .RE
135 .PP
136 \fB\-V, \-\-version\fR
137 .RS 4
138 Display version and exit\&.
139 .RE
140 .PP
141 \fB\-h, \-\-help\fR
142 .RS 4
143 Display syntax for the given operation\&. If no operation was supplied, then the general syntax is shown\&.
144 .RE
145 .SH "OPTIONS"
146 .PP
147 \fB\-b, \-\-dbpath\fR <path>
148 .RS 4
149 Specify an alternative database location (the default is
150 /var/lib/pacman)\&. This should not be used unless you know what you are doing\&.
151 \fBNOTE\fR: If specified, this is an absolute path, and the root path is not automatically prepended\&.
152 .RE
153 .PP
154 \fB\-r, \-\-root\fR <path>
155 .RS 4
156 Specify an alternative installation root (default is
157 /)\&. This should not be used as a way to install software into
158 /usr/local
159 instead of
160 /usr\&.
161 \fBNOTE\fR: If database path or log file are not specified on either the command line or in
162 \fBpacman.conf\fR(5), their default location will be inside this root path\&.
163 \fBNOTE\fR: This option is not suitable for performing operations on a mounted guest system\&. See
164 \fI\-\-sysroot\fR
165 instead\&.
166 .RE
167 .PP
168 \fB\-v, \-\-verbose\fR
169 .RS 4
170 Output paths such as the Root, Conf File, DB Path, Cache Dirs, etc\&.
171 .RE
172 .PP
173 \fB\-\-arch\fR <arch>
174 .RS 4
175 Specify an alternate architecture\&.
176 .RE
177 .PP
178 \fB\-\-cachedir\fR <dir>
179 .RS 4
180 Specify an alternative package cache location (the default is
181 /var/cache/pacman/pkg)\&. Multiple cache directories can be specified, and they are tried in the order they are passed to pacman\&.
182 \fBNOTE\fR: This is an absolute path, and the root path is not automatically prepended\&.
183 .RE
184 .PP
185 \fB\-\-color\fR <when>
186 .RS 4
187 Specify when to enable coloring\&. Valid options are
188 \fIalways\fR,
189 \fInever\fR, or
190 \fIauto\fR\&.
191 \fIalways\fR
192 forces colors on;
193 \fInever\fR
194 forces colors off; and
195 \fIauto\fR
196 only automatically enables colors when outputting onto a tty\&.
197 .RE
198 .PP
199 \fB\-\-config\fR <file>
200 .RS 4
201 Specify an alternate configuration file\&.
202 .RE
203 .PP
204 \fB\-\-debug\fR
205 .RS 4
206 Display debug messages\&. When reporting bugs, this option is recommended to be used\&.
207 .RE
208 .PP
209 \fB\-\-gpgdir\fR <dir>
210 .RS 4
211 Specify a directory of files used by GnuPG to verify package signatures (the default is
212 /etc/pacman\&.d/gnupg)\&. This directory should contain two files:
213 pubring\&.gpg
214 and
215 trustdb\&.gpg\&.
216 pubring\&.gpg
217 holds the public keys of all packagers\&.
218 trustdb\&.gpg
219 contains a so\-called trust database, which specifies that the keys are authentic and trusted\&.
220 \fBNOTE\fR: This is an absolute path, and the root path is not automatically prepended\&.
221 .RE
222 .PP
223 \fB\-\-hookdir\fR <dir>
224 .RS 4
225 Specify a alternative directory containing hook files (the default is
226 /etc/pacman\&.d/hooks)\&. Multiple hook directories can be specified with hooks in later directories taking precedence over hooks in earlier directories\&.
227 \fBNOTE\fR: This is an absolute path, and the root path is not automatically prepended\&.
228 .RE
229 .PP
230 \fB\-\-logfile\fR <file>
231 .RS 4
232 Specify an alternate log file\&. This is an absolute path, regardless of the installation root setting\&.
233 .RE
234 .PP
235 \fB\-\-noconfirm\fR
236 .RS 4
237 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\&.
238 .RE
239 .PP
240 \fB\-\-confirm\fR
241 .RS 4
242 Cancels the effects of a previous
243 \fI\-\-noconfirm\fR\&.
244 .RE
245 .PP
246 \fB\-\-disable\-download\-timeout\fR
247 .RS 4
248 Disable defaults for low speed limit and timeout on downloads\&. Use this if you have issues downloading files with proxy and/or security gateway\&.
249 .RE
250 .PP
251 \fB\-\-sysroot\fR <dir>
252 .RS 4
253 Specify an alternative system root\&. This path will be prepended to all other configuration directories and any repository servers beginning with
254 file://\&. Any paths or URLs passed as targets will not be modified\&. This allows mounted guest systems to be properly operated on\&.
255 .RE
256 .PP
257 \fB\-\-disable\-sandbox\fR
258 .RS 4
259 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\&.
260 .RE
261 .SH "TRANSACTION OPTIONS (APPLY TO \FI\-S\FR, \FI\-R\FR AND \FI\-U\FR)"
262 .PP
263 \fB\-d, \-\-nodeps\fR
264 .RS 4
265 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\&.
266 .RE
267 .PP
268 \fB\-\-assume\-installed\fR <package=version>
269 .RS 4
270 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
271 \fI\-\-nodeps\fR
272 option\&.
273 .RE
274 .PP
275 \fB\-\-dbonly\fR
276 .RS 4
277 Adds/removes the database entry only, leaving all files in place\&.
278 .RE
279 .PP
280 \fB\-\-noprogressbar\fR
281 .RS 4
282 Do not show a progress bar when downloading files\&. This can be useful for scripts that call pacman and capture the output\&.
283 .RE
284 .PP
285 \fB\-\-noscriptlet\fR
286 .RS 4
287 If an install scriptlet exists, do not execute it\&. Do not use this unless you know what you are doing\&.
288 .RE
289 .PP
290 \fB\-p, \-\-print\fR
291 .RS 4
292 Only print the targets instead of performing the actual operation (sync, remove or upgrade)\&. Use
293 \fI\-\-print\-format\fR
294 to specify how targets are displayed\&. The default format string is "%l", which displays URLs with
295 \fI\-S\fR, file names with
296 \fI\-U\fR, and pkgname\-pkgver with
297 \fI\-R\fR\&.
298 .RE
299 .PP
300 \fB\-\-print\-format\fR <format>
301 .RS 4
302 Specify a printf\-like format to control the output of the
303 \fI\-\-print\fR
304 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
305 \fI\-\-print\fR\&.
306 .RE
307 .SH "UPGRADE OPTIONS (APPLY TO \FI\-S\FR AND \FI\-U\FR)"
308 .PP
309 \fB\-w, \-\-downloadonly\fR
310 .RS 4
311 Retrieve all packages from the server, but do not install/upgrade anything\&.
312 .RE
313 .PP
314 \fB\-\-asdeps\fR
315 .RS 4
316 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\&.
317 .RE
318 .PP
319 \fB\-\-asexplicit\fR
320 .RS 4
321 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
322 \fI\-\-recursive\fR
323 remove operation\&.
324 .RE
325 .PP
326 \fB\-\-ignore\fR <package>
327 .RS 4
328 Directs pacman to ignore upgrades of package even if there is one available\&. Multiple packages can be specified by separating them with a comma\&.
329 .RE
330 .PP
331 \fB\-\-ignoregroup\fR <group>
332 .RS 4
333 Directs pacman to ignore upgrades of all packages in
334 \fIgroup\fR, even if there is one available\&. Multiple groups can be specified by separating them with a comma\&.
335 .RE
336 .PP
337 \fB\-\-needed\fR
338 .RS 4
339 Do not reinstall the targets that are already up\-to\-date\&.
340 .RE
341 .PP
342 \fB\-\-overwrite\fR <glob>
343 .RS 4
344 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
345 \fIglob\fR, this option will cause all those files to be overwritten\&. Using
346 \fI\-\-overwrite\fR
347 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\&.
348 .RE
349 .SH "QUERY OPTIONS (APPLY TO \FI\-Q\FR)"
350 .PP
351 \fB\-c, \-\-changelog\fR
352 .RS 4
353 View the ChangeLog of a package if it exists\&.
354 .RE
355 .PP
356 \fB\-d, \-\-deps\fR
357 .RS 4
358 Restrict or filter output to packages installed as dependencies\&. This option can be combined with
359 \fI\-t\fR
360 for listing real orphans \- packages that were installed as dependencies but are no longer required by any installed package\&.
361 .RE
362 .PP
363 \fB\-e, \-\-explicit\fR
364 .RS 4
365 Restrict or filter output to explicitly installed packages\&. This option can be combined with
366 \fI\-t\fR
367 to list explicitly installed packages that are not required by any other package\&.
368 .RE
369 .PP
370 \fB\-g, \-\-groups\fR
371 .RS 4
372 Display all packages that are members of a named group\&. If a name is not specified, list all grouped packages\&.
373 .RE
374 .PP
375 \fB\-i, \-\-info\fR
376 .RS 4
377 Display information on a given package\&. The
378 \fI\-p\fR
379 option can be used if querying a package file instead of the local database\&. Passing two
380 \fI\-\-info\fR
381 or
382 \fI\-i\fR
383 flags will also display the list of backup files and their modification states\&.
384 .RE
385 .PP
386 \fB\-k, \-\-check\fR
387 .RS 4
388 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\&.
389 .RE
390 .PP
391 \fB\-l, \-\-list\fR
392 .RS 4
393 List all files owned by a given package\&. Multiple packages can be specified on the command line\&.
394 .RE
395 .PP
396 \fB\-m, \-\-foreign\fR
397 .RS 4
398 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
399 \fI\-\-upgrade\fR\&.
400 .RE
401 .PP
402 \fB\-n, \-\-native\fR
403 .RS 4
404 Restrict or filter output to packages that are found in the sync database(s)\&. This is the inverse filter of
405 \fI\-\-foreign\fR\&.
406 .RE
407 .PP
408 \fB\-o, \-\-owns\fR <file>
409 .RS 4
410 Search for packages that own the specified file(s)\&. The path can be relative or absolute, and one or more files can be specified\&.
411 .RE
412 .PP
413 \fB\-p, \-\-file\fR
414 .RS 4
415 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
416 \fI\-\-info\fR
417 and
418 \fI\-\-list\fR\&.
419 .RE
420 .PP
421 \fB\-q, \-\-quiet\fR
422 .RS 4
423 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\&.
424 .RE
425 .PP
426 \fB\-s, \-\-search\fR <regexp>
427 .RS 4
428 Search each locally\-installed package for names or descriptions that match
429 regexp\&. When including multiple search terms, only packages with descriptions matching ALL of those terms are returned\&.
430 .RE
431 .PP
432 \fB\-t, \-\-unrequired\fR
433 .RS 4
434 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\&.
435 .RE
436 .PP
437 \fB\-u, \-\-upgrades\fR
438 .RS 4
439 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
440 \fI\-Sy\fR\&.
441 .RE
442 .SH "REMOVE OPTIONS (APPLY TO \FI\-R\FR)"
443 .PP
444 \fB\-c, \-\-cascade\fR
445 .RS 4
446 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\&.
447 .RE
448 .PP
449 \fB\-n, \-\-nosave\fR
450 .RS 4
451 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
452 \fI\&.pacsave\fR
453 extension\&.
454 .RE
455 .PP
456 \fB\-s, \-\-recursive\fR
457 .RS 4
458 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
459 \fI\-\-sync\fR
460 operation, and it helps keep a clean system without orphans\&. If you want to omit condition (B), pass this option twice\&.
461 .RE
462 .PP
463 \fB\-u, \-\-unneeded\fR
464 .RS 4
465 Removes targets that are not required by any other packages\&. This is mostly useful when removing a group without using the
466 \fI\-c\fR
467 option, to avoid breaking any dependencies\&.
468 .RE
469 .SH "SYNC OPTIONS (APPLY TO \FI\-S\FR)"
470 .PP
471 \fB\-c, \-\-clean\fR
472 .RS 4
473 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
474 \fBpacman.conf\fR(5)\&. Use one
475 \fI\-\-clean\fR
476 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\&.
477 .sp
478 If you use a network shared cache, see the
479 \fICleanMethod\fR
480 option in
481 \fBpacman.conf\fR(5)\&.
482 .RE
483 .PP
484 \fB\-g, \-\-groups\fR
485 .RS 4
486 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\&.
487 .RE
488 .PP
489 \fB\-i, \-\-info\fR
490 .RS 4
491 Display information on a given sync database package\&. Passing two
492 \fI\-\-info\fR
493 or
494 \fI\-i\fR
495 flags will also display those packages in all repositories that depend on this package\&.
496 .RE
497 .PP
498 \fB\-l, \-\-list\fR
499 .RS 4
500 List all packages in the specified repositories\&. Multiple repositories can be specified on the command line\&.
501 .RE
502 .PP
503 \fB\-q, \-\-quiet\fR
504 .RS 4
505 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\&.
506 .RE
507 .PP
508 \fB\-s, \-\-search\fR <regexp>
509 .RS 4
510 This will search each package in the sync databases for names or descriptions that match
511 regexp\&. When you include multiple search terms, only packages with descriptions matching ALL of those terms will be returned\&.
512 .RE
513 .PP
514 \fB\-u, \-\-sysupgrade\fR
515 .RS 4
516 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\&.
517 .sp
518 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\&.
519 .sp
520 Additional targets can also be specified manually, so that
521 \fI\-Su foo\fR
522 will do a system upgrade and install/upgrade the "foo" package in the same operation\&.
523 .RE
524 .PP
525 \fB\-y, \-\-refresh\fR
526 .RS 4
527 Download a fresh copy of the master package databases
528 \fI(repo\&.db)\fR
529 from the server(s) defined in
530 \fBpacman.conf\fR(5)\&. This should typically be used each time you use
531 \fI\-\-sysupgrade\fR
532 or
533 \fI\-u\fR\&. Passing two
534 \fI\-\-refresh\fR
535 or
536 \fI\-y\fR
537 flags will force a refresh of all package databases, even if they appear to be up\-to\-date\&.
538 .RE
539 .SH "DATABASE OPTIONS (APPLY TO \FI\-D\FR)"
540 .PP
541 \fB\-\-asdeps\fR <package>
542 .RS 4
543 Mark a package as non\-explicitly installed; in other words, set their install reason to be installed as a dependency\&.
544 .RE
545 .PP
546 \fB\-\-asexplicit\fR <package>
547 .RS 4
548 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\&.
549 .RE
550 .PP
551 \fB\-k, \-\-check\fR
552 .RS 4
553 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\&.
554 .RE
555 .PP
556 \fB\-q, \-\-quiet\fR
557 .RS 4
558 Suppress messages on successful completion of database operations\&.
559 .RE
560 .SH "FILE OPTIONS (APPLY TO \FI\-F\FR)"
561 .PP
562 \fB\-y, \-\-refresh\fR
563 .RS 4
564 Download fresh package file databases
565 \fI(repo\&.files)\fR
566 from the server\&. Use twice to force a refresh even if databases are up to date\&.
567 .RE
568 .PP
569 \fB\-l, \-\-list\fR
570 .RS 4
571 List the files owned by the queried package\&.
572 .RE
573 .PP
574 \fB\-x, \-\-regex\fR
575 .RS 4
576 Interpret each query as a regular expression\&.
577 .RE
578 .PP
579 \fB\-q, \-\-quiet\fR
580 .RS 4
581 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
582 \fI\-\-machinereadable\fR
583 instead\&.
584 .RE
585 .PP
586 \fB\-\-machinereadable\fR
587 .RS 4
588 Print each match in a machine readable output format\&. The format is
589 \fIrepository\e0pkgname\e0pkgver\e0path\en\fR
590 with
591 \fI\e0\fR
592 being the NULL character and
593 \fI\en\fR
594 a linefeed\&.
595 .RE
596 .SH "HANDLING CONFIG FILES"
597 .sp
598 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:
599 .PP
600 original=X, current=X, new=X
601 .RS 4
602 All three files are the same, so overwrites are not an issue\&. Install the new file\&.
603 .RE
604 .PP
605 original=X, current=X, new=Y
606 .RS 4
607 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\&.
608 .RE
609 .PP
610 original=X, current=Y, new=X
611 .RS 4
612 Both package versions contain the exact same file, but the one on the file system has been modified\&. Leave the current file in place\&.
613 .RE
614 .PP
615 original=X, current=Y, new=Y
616 .RS 4
617 The new file is identical to the current file\&. Install the new file\&.
618 .RE
619 .PP
620 original=X, current=Y, new=Z
621 .RS 4
622 All three files are different, so install the new file with a
623 \fI\&.pacnew\fR
624 extension and warn the user\&. The user must then manually merge any necessary changes into the original file\&.
625 .RE
626 .PP
627 original=NULL, current=Y, new=Z
628 .RS 4
629 The package was not previously installed, and the file already exists on the file system\&. Install the new file with a
630 \fI\&.pacnew\fR
631 extension and warn the user\&. The user must then manually merge any necessary changes into the original file\&.
632 .RE
633 .SH "EXAMPLES"
634 .PP
635 pacman \-Ss ne\&.hack
636 .RS 4
637 Search for regexp "ne\&.hack" in package database\&.
638 .RE
639 .PP
640 pacman \-S gpm
641 .RS 4
642 Download and install gpm including dependencies\&.
643 .RE
644 .PP
645 pacman \-U /home/user/ceofhack\-0\&.6\-1\-x86_64\&.pkg\&.tar\&.gz
646 .RS 4
647 Install ceofhack\-0\&.6\-1 package from a local file\&.
648 .RE
649 .PP
650 pacman \-Syu
651 .RS 4
652 Update package list and upgrade all packages afterwards\&.
653 .RE
654 .PP
655 pacman \-Syu gpm
656 .RS 4
657 Update package list, upgrade all packages, and then install gpm if it wasn\(cqt already installed\&.
658 .RE
659 .SH "CONFIGURATION"
660 .sp
661 See \fBpacman.conf\fR(5) for more details on configuring pacman using the \fIpacman\&.conf\fR file\&.
662 .SH "SEE ALSO"
663 .sp
664 \fBalpm-hooks\fR(5), \fBlibalpm\fR(3), \fBmakepkg\fR(8), \fBpacman.conf\fR(5)
665 .sp
666 See the pacman website at https://archlinux\&.org/pacman/ for current information on pacman and its related tools\&.
667 .SH "BUGS"
668 .sp
669 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\&.
670 .SH "AUTHORS"
671 .sp
672 Current maintainers:
673 .sp
674 .RS 4
675 .ie n \{\
676 \h'-04'\(bu\h'+03'\c
677 .\}
678 .el \{\
679 .sp -1
680 .IP \(bu 2.3
681 .\}
682 Allan McRae <allan@archlinux\&.org>
683 .RE
684 .sp
685 .RS 4
686 .ie n \{\
687 \h'-04'\(bu\h'+03'\c
688 .\}
689 .el \{\
690 .sp -1
691 .IP \(bu 2.3
692 .\}
693 Andrew Gregory <andrew\&.gregory\&.8@gmail\&.com>
694 .RE
695 .sp
696 .RS 4
697 .ie n \{\
698 \h'-04'\(bu\h'+03'\c
699 .\}
700 .el \{\
701 .sp -1
702 .IP \(bu 2.3
703 .\}
704 Morgan Adamiec <morganamilo@archlinux\&.org>
705 .RE
706 .sp
707 Past major contributors:
708 .sp
709 .RS 4
710 .ie n \{\
711 \h'-04'\(bu\h'+03'\c
712 .\}
713 .el \{\
714 .sp -1
715 .IP \(bu 2.3
716 .\}
717 Judd Vinet <jvinet@zeroflux\&.org>
718 .RE
719 .sp
720 .RS 4
721 .ie n \{\
722 \h'-04'\(bu\h'+03'\c
723 .\}
724 .el \{\
725 .sp -1
726 .IP \(bu 2.3
727 .\}
728 Aurelien Foret <aurelien@archlinux\&.org>
729 .RE
730 .sp
731 .RS 4
732 .ie n \{\
733 \h'-04'\(bu\h'+03'\c
734 .\}
735 .el \{\
736 .sp -1
737 .IP \(bu 2.3
738 .\}
739 Aaron Griffin <aaron@archlinux\&.org>
740 .RE
741 .sp
742 .RS 4
743 .ie n \{\
744 \h'-04'\(bu\h'+03'\c
745 .\}
746 .el \{\
747 .sp -1
748 .IP \(bu 2.3
749 .\}
750 Dan McGee <dan@archlinux\&.org>
751 .RE
752 .sp
753 .RS 4
754 .ie n \{\
755 \h'-04'\(bu\h'+03'\c
756 .\}
757 .el \{\
758 .sp -1
759 .IP \(bu 2.3
760 .\}
761 Xavier Chantry <shiningxc@gmail\&.com>
762 .RE
763 .sp
764 .RS 4
765 .ie n \{\
766 \h'-04'\(bu\h'+03'\c
767 .\}
768 .el \{\
769 .sp -1
770 .IP \(bu 2.3
771 .\}
772 Nagy Gabor <ngaba@bibl\&.u\-szeged\&.hu>
773 .RE
774 .sp
775 .RS 4
776 .ie n \{\
777 \h'-04'\(bu\h'+03'\c
778 .\}
779 .el \{\
780 .sp -1
781 .IP \(bu 2.3
782 .\}
783 Dave Reisner <dreisner@archlinux\&.org>
784 .RE
785 .sp
786 .RS 4
787 .ie n \{\
788 \h'-04'\(bu\h'+03'\c
789 .\}
790 .el \{\
791 .sp -1
792 .IP \(bu 2.3
793 .\}
794 Eli Schwartz <eschwartz@archlinux\&.org>
795 .RE
796 .sp
797 For additional contributors, use git shortlog \-s on the pacman\&.git repository\&.