2 vim:set ts=4 sw=4 syntax=asciidoc noet:
9 pacman - package manager utility
14 'pacman' <operation> [options] [packages]
19 Pacman is a package management utility that tracks installed packages on a Linux
20 system. It features dependency support, package groups, install and uninstall
21 hooks, and the ability to sync your local machine with a remote ftp server to
22 automatically upgrade packages. Pacman packages are a zipped tar format.
24 Since version 3.0.0, pacman has been the frontend to linkman:libalpm[3], the
25 ``Arch Linux Package Management'' library. This library allows alternative
26 front ends to be written (for instance, a GUI front end).
32 Query the package database. This operation allows you to view installed
33 packages and their files, as well as meta-information about individual
34 packages (dependencies, conflicts, install date, build date, size). This
35 can be run against the local package database or can be used on
36 individual '.tar.gz' packages. See <<QO,Query Options>> below.
39 Remove a package from the system. Groups can also be specified to be
40 removed, in which case every package in that group will be removed.
41 Files belonging to the specified package will be deleted, and the
42 database will be updated. Most configuration files will be saved
43 with a `.pacsave` extension unless the '\--nosave' option is used.
44 See <<RO,Remove Options>> below.
47 Synchronize packages. Packages are installed directly from the ftp
48 servers, including all dependencies required to run the packages. For
49 example, `pacman -S qt` will download and install qt and all the
50 packages it depends on. If a package name exists in more than one repo, the
51 repo can be explicitly specified to clarify the package to install:
52 `pacman -S testing/qt`. You can also specify version requirements:
53 `pacman -S "bash>=3.2"`. (Quotes are needed, otherwise your shell
54 interprets ">" as redirection to file.)
56 In addition to packages, groups can be specified as well. For example, if
57 gnome is a defined package group, then `pacman -S gnome` will install every
58 package in the gnome group, as well as the dependencies of those packages.
60 Packages which provide other packages are also handled. For example, `pacman -S
61 foo` will first look for a foo package. If foo is not found, packages which
62 provide the same functionality as foo will be searched for. If any package is
63 found, it will be installed.
65 You can also use `pacman -Su` to upgrade all packages that are out of date. See
66 <<SO,Sync Options>> below. When upgrading, pacman performs version comparison
67 to determine which packages need upgrading. This behavior operates as follows:
70 1.0a < 1.0alpha < 1.0b < 1.0beta < 1.0p < 1.0pre < 1.0rc < 1.0
72 1 < 1.0 < 1.1 < 1.1.1 < 1.2 < 2.0 < 3.0.0
75 Upgrade or add a package to the system. Either a URL or file path can be
76 specified. This is a ``remove-then-add'' process. See <<HCF,Handling Config
77 Files>> for an explanation on how pacman takes care of config files.
80 Display version and exit.
83 Display syntax for the given operation. If no operation was supplied
84 then the general syntax is shown.
90 Install packages non-explicitly; in other words, fake their install reason
91 to be installed as a dependency. This is useful for makepkg and other
92 build from source tools that need to install dependencies before building
96 Install packages explicitly; in other words, fake their install reason to
97 be explicitly installed. This is useful if you want to mark a dependency
98 as explicitly installed so it will not be removed by the '\--recursive'
101 *-b, \--dbpath* <'path'>::
102 Specify an alternative database location (a typical default is
103 ``/var/lib/pacman''). This should not be used unless you know what you are
104 doing. *NOTE*: if specified, this is an absolute path and the root path is
105 not automatically prepended.
108 Skips all dependency checks. Normally, pacman will always check a
109 package's dependency fields to ensure that all dependencies are
110 installed and there are no package conflicts in the system.
113 Bypass file conflict checks and overwrite conflicting files. If the
114 package that is about to be installed contains files that are already
115 installed, this option will cause all those files to be overwritten.
116 This option should be used with care, ideally not at all.
118 *-r, \--root* <'path'>::
119 Specify an alternative installation root (default is ``/''). This should
120 not be used as a way to install software into ``/usr/local'' instead of
121 ``/usr''. This option is used if you want to install a package on a
122 temporary mounted partition which is "owned" by another system.
123 *NOTE*: if database path or logfile are not specified on either the
124 command line or in linkman:pacman.conf[5], their default location will
125 be inside this root path.
128 Output paths such as as the Root, Conf File, DB Path, Cache Dirs, etc.
130 *\--cachedir* <'dir'>::
131 Specify an alternative package cache location (a typical default is
132 ``/var/cache/pacman/pkg''). Multiple cache directories can be specified,
133 and they are tried in the order they are passed to pacman. *NOTE*: this
134 is an absolute path, the root path is not automatically prepended.
136 *\--config* <'file'>::
137 Specify an alternate configuration file.
139 *\--logfile* <'file'>::
140 Specify an alternate log file. This is an absolute path, regardless of
141 the installation root setting.
144 Bypass any and all ``Are you sure?'' messages. It's not a good idea to do
145 this unless you want to run pacman from a script.
148 Do not show a progress bar when downloading files. This can be useful
149 for scripts that call pacman and capture the output.
152 If an install scriptlet exists, do not execute it. Do not use this
153 unless you know what you are doing.
159 View the ChangeLog of a package. Not every package will provide one but
160 it will be shown if available.
163 List all packages installed as dependencies. This option can be combined
164 with '-t' for listing real orphans- packages that were installed as
165 dependencies but are no longer required by any installed package. ('-Qdt'
166 is equivalent to the pacman 3.0.X '-Qe' option.)
169 List all packages explicitly installed. This option can be combined with
170 '-t' to list top-level packages- those packages that were explicitly
171 installed but are not required by any other package. ('-Qet' is equivalent
172 to the pacman 2.9.X '-Qe' option.)
175 Display all packages that are members of a named group. If a name is not
176 specified, list all grouped packages.
179 Display information on a given package. The '-p' option can be used if
180 querying a package file instead of the local database. Passing two
181 '\--info' or '-i' flags will also display the list of backup files and
182 their modification states.
185 List all files owned by a given package. Multiple packages can be
186 specified on the command line.
189 Restrict or filter output to packages that were not found in the sync
190 database(s). Typically these are packages that were downloaded manually
191 and installed with '\--upgrade'.
193 *-o, \--owns* <'file'>::
194 Search for the package that owns file. The path can be relative or
198 Signifies that the package supplied on the command line is a file and
199 not an entry in the database. The file will be decompressed and queried.
200 This is useful in combination with '\--info' and '\--list'.
203 Show less information for certain query operations. Search will only show
204 package names and not version, group, and description information; a bare
205 query will only show package names rather than names and versions.
207 *-s, \--search* <'regexp'>::
208 This will search each locally-installed package for names or
209 descriptions that match `regexp`.
211 *-t, \--unrequired*::
212 Restrict or filter output to packages not required by any currently
216 Lists all packages that are out of date on the local system. This option
217 works best if the sync database is refreshed using '-Sy'.
223 Remove all target packages, as well as all packages that depend on one
224 or more target packages. This operation is recursive, and must be used
225 with care since it can remove many potentially needed packages.
228 Removes the database entry only. Leaves all files in place.
231 Instructs pacman to ignore file backup designations. Normally, when a
232 file is removed from the system the database is checked to see if the
233 file should be renamed with a ``.pacsave'' extension.
236 Remove each target specified including all of their dependencies, provided
237 that (A) they are not required by other packages; and (B) they were not
238 explicitly installed by the user. This operation is recursive and analogous
239 to a backwards '\--sync' operation, and helps keep a clean system without
240 orphans. If you want to omit condition (B), pass this option twice.
243 Removes the targets that are not required by any other packages.
244 This is mostly useful when removing a group without using the '-c' option,
245 to avoid breaking any dependencies.
251 Remove packages that are no longer installed from the cache as well as
252 currently unused sync databases to free up disk space. When pacman
253 downloads packages, it saves them in a cache directory. In addition,
254 databases are saved for every sync DB you download from, and are not
255 deleted even if they are removed from the configuration file
256 linkman:pacman.conf[5]. Use one '\--clean' switch to only remove
257 packages that are no longer installed; use two to remove all packages
258 from the cache. In both cases, you will have a yes or no option to
259 remove packages and/or unused downloaded databases.
261 If you use a network shared cache, see the 'CleanMethod' option in
262 linkman:pacman.conf[5].
265 Display all the members for each package group specified. If no group
266 names are provided, all groups will be listed; pass the flag twice to
267 view all groups and their members.
270 Display dependency and other information for a given package. This will
271 search through all repositories for a matching package.
274 List all packages in the specified repositories. Multiple repositories
275 can be specified on the command line.
277 *-p, \--print-uris*::
278 Print out URIs for each package that will be installed, including any
279 dependencies yet to be installed. These can be piped to a file and
280 downloaded at a later time, using a program like wget.
283 Show less information for certain sync operations. Search will only show
284 package names and not version, group, and description information; list
285 will only show package names and omit databases and versions.
287 *-s, \--search* <'regexp'>::
288 This will search each package in the sync databases for names or
289 descriptions that match `regexp`.
291 *-u, \--sysupgrade*::
292 Upgrades all packages that are out of date. Each currently-installed
293 package will be examined and upgraded if a newer package exists. A
294 report of all packages to upgrade will be presented and the operation
295 will not proceed without user confirmation. Dependencies are
296 automatically resolved at this level and will be installed/upgraded if
299 *-w, \--downloadonly*::
300 Retrieve all packages from the server, but do not install/upgrade
304 Download a fresh copy of the master package list from the server(s)
305 defined in linkman:pacman.conf[5]. This should typically be used each time
306 you use '\--sysupgrade' or '-u'. Passing two '\--refresh' or '-y' flags
307 will force a refresh of all package lists even if they are thought to be up
311 Don't reinstall the targets that are already up-to-date.
313 *\--ignore* <'package'>::
314 Directs pacman to ignore upgrades of package even if there is one
315 available. Multiple packages can be specified by separating them
318 *\--ignoregroup* <'group'>::
319 Directs pacman to ignore upgrades of all packages in 'group' even if
320 there is one available. Multiple groups can be specified by
321 separating them with a comma.
324 Handling Config Files[[HCF]]
325 ----------------------------
326 Pacman uses the same logic as rpm to determine action against files that are
327 designated to be backed up. During an upgrade, 3 md5 hashes are used for each
328 backup file to determine the required action: one for the original file
329 installed, one for the new file that's about to be installed, and one for the
330 actual file existing on the filesystem. After comparing these 3 hashes, the
331 follow scenarios can result:
333 original=X, current=X, new=X::
334 All three files are the same, so overwrites are not an issue Install the
337 original=X, current=X, new=Y::
338 The current file is the same as the original but the new one differs.
339 Since the user did not ever modify the file, and the new one may contain
340 improvements or bugfixes, install the new file.
342 original=X, current=Y, new=X::
343 Both package versions contain the exact same file, but the one on the
344 filesystem has been modified. Leave the current file in place.
346 original=X, current=Y, new=Y::
347 The new file is identical to the current file. Install the new file.
349 original=X, current=Y, new=Z::
350 All three files are different, so install the new file with a '.pacnew'
351 extension and warn the user. The user must then manually merge any
352 necessary changes into the original file.
357 See linkman:pacman.conf[5] for more details on configuring pacman using the
363 linkman:pacman.conf[5], linkman:makepkg[8], linkman:libalpm[3]
365 include::footer.txt[]