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 front
26 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`.
54 In addition to packages, groups can be specified as well. For example, if
55 gnome is a defined package group, then `pacman -S gnome` will install every
56 package in the gnome group, as well as the dependencies of those packages.
58 Packages which provide other packages are also handled. For example, `pacman -S
59 foo` will first look for a foo package. If foo is not found, packages which
60 provide the same functionality as foo will be searched for. If any package is
61 found, it will be installed.
63 You can also use `pacman -Su` to upgrade all packages that are out of date. See
64 <<SO,Sync Options>> below. When upgrading, pacman performs version comparison
65 to determine which packages need upgrading. This behavior operates as follows:
68 1.0 < 1.0a < 1.0alpha < 1.0b < 1.0beta < 1.0p < 1.0pre < 1.0rc
70 1 < 1.0 < 1.1 < 1.1.1 < 1.2 < 2.0 < 3.0.0
73 Upgrade or add a package to the system. Either a URL or file path can be
74 specified. This is a "remove-then-add" process. See <<HCF,Handling Config
75 Files>> for an explanation on how pacman takes care of config files.
78 Display version and exit.
81 Display syntax for the given operation. If no operation was supplied
82 then the general syntax is shown.
88 Install packages non-explicitly; in other words, fake their install reason
89 to be installed as a dependency. This is useful for makepkg and other
90 build from source tools that need to install dependencies before building
94 Install packages explicitly; in other words, fake their install reason to
95 be explicitly installed. This is useful if you want to mark a dependency
96 as explicitly installed so it will not be removed by the '\--recursive'
99 *-b, \--dbpath* <'path'>::
100 Specify an alternative database location (a typical default is
101 ``/var/lib/pacman''). This should not be used unless you know what you are
102 doing. *NOTE*: if specified, this is an absolute path and the root path is
103 not automatically prepended.
106 Skips all dependency checks. Normally, pacman will always check a
107 package's dependency fields to ensure that all dependencies are
108 installed and there are no package conflicts in the system.
111 Bypass file conflict checks and overwrite conflicting files. If the
112 package that is about to be installed contains files that are already
113 installed, this option will cause all those files to be overwritten.
114 This option should be used with care, ideally not at all.
116 *-r, \--root* <'path'>::
117 Specify an alternative installation root (default is ``/''). This should
118 not be used as a way to install software into ``/usr/local'' instead of
119 ``/usr''. This option is used if you want to install a package on a
120 temporary mounted partition which is "owned" by another system.
121 *NOTE*: if database path or logfile are not specified on either the
122 command line or in linkman:pacman.conf[5], their default location will
123 be inside this root path.
126 Output paths such as as the Root, Conf File, DB Path, Cache Dirs, etc.
128 *\--cachedir* <'dir'>::
129 Specify an alternative package cache location (a typical default is
130 ``/var/cache/pacman/pkg''). Multiple cache directories can be specified,
131 and they are tried in the order they are passed to pacman. *NOTE*: this
132 is an absolute path, the root path is not automatically prepended.
134 *\--config* <'file'>::
135 Specify an alternate configuration file.
137 *\--logfile* <'file'>::
138 Specify an alternate log file. This is an absolute path, regardless of
139 the installation root setting.
142 Bypass any and all "Are you sure?" messages. It's not a good idea to do
143 this unless you want to run pacman from a script.
146 Do not show a progress bar when downloading files. This can be useful
147 for scripts that call pacman and capture the output.
150 If an install scriptlet exists, do not execute it. Do not use this
151 unless you know what you are doing.
157 View the ChangeLog of a package. Not every package will provide one but
158 it will be shown if available.
161 List all packages installed as dependencies. This option can be combined
162 with '-t' for listing real orphans- packages that were installed as
163 dependencies but are no longer required by any installed package. ('-Qdt'
164 is equivalent to the pacman 3.0.X '-Qe' option.)
167 List all packages explicitly installed. This option can be combined with
168 '-t' to list top-level packages- those packages that were explicitly
169 installed but are not required by any other package. ('-Qet' is equivalent
170 to the pacman 2.9.X '-Qe' option.)
173 Display all packages that are members of a named group. If a name is not
174 specified, list all grouped packages.
177 Display information on a given package. The '-p' option can be used if
178 querying a package file instead of the local database. Passing two
179 '\--info' or '-i' flags will also display the list of backup files and
180 their modification states.
183 List all files owned by a given package. Multiple packages can be
184 specified on the command line.
187 Restrict or filter output to packages that were not found in the sync
188 database(s). Typically these are packages that were downloaded manually
189 and installed with '\--upgrade'.
191 *-o, \--owns* <'file'>::
192 Search for the package that owns file. The path can be relative or
196 Signifies that the package supplied on the command line is a file and
197 not an entry in the database. The file will be decompressed and queried.
198 This is useful in combination with '\--info' and '\--list'.
201 Show less information for certain query operations. Search will only show
202 package names and not version, group, and description information; a bare
203 query will only show package names rather than names and versions.
205 *-s, \--search* <'regexp'>::
206 This will search each locally-installed package for names or
207 descriptions that match `regexp`.
209 *-t, \--unrequired*::
210 Restrict or filter output to packages not required by any currently
214 Lists all packages that are out of date on the local system. This option
215 works best if the sync database is refreshed using '-Sy'.
221 Remove all target packages, as well as all packages that depend on one
222 or more target packages. This operation is recursive, and must be used
223 with care since it can remove many potentially needed packages.
226 Removes the database entry only. Leaves all files in place.
229 Instructs pacman to ignore file backup designations. Normally, when a
230 file is removed from the system the database is checked to see if the
231 file should be renamed with a ``.pacsave'' extension.
234 Remove each target specified including all of their dependencies, provided
235 that (A) they are not required by other packages; and (B) they were not
236 explicitly installed by the user. This operation is recursive and analogous
237 to a backwards '\--sync' operation, and helps keep a clean system without
238 orphans. If you want to omit condition (B), pass this option twice.
241 Removes the targets that are not required by any other packages.
242 This is mostly useful when removing a group without using the '-c' option,
243 to avoid breaking any dependencies.
249 Remove packages that are no longer installed from the cache as well as
250 currently unused sync databases to free up disk space. When pacman
251 downloads packages, it saves them in a cache directory. In addition,
252 databases are saved for every sync DB you download from, and are not
253 deleted even if they are removed from the configuration file
254 linkman:pacman.conf[5]. Use one '\--clean' switch to only remove
255 packages that are no longer installed; use two to remove all packages
256 from the cache. In both cases, you will have a yes or no option to
257 remove packages and/or unused downloaded databases.
259 If you use a network shared cache, see the 'CleanMethod' option in
260 linkman:pacman.conf[5].
263 Display all the members for each package group specified. If no group
264 names are provided, all groups will be listed; pass the flag twice to
265 view all groups and their members.
268 Display dependency and other information for a given package. This will
269 search through all repositories for a matching package.
272 List all packages in the specified repositories. Multiple repositories
273 can be specified on the command line.
275 *-p, \--print-uris*::
276 Print out URIs for each package that will be installed, including any
277 dependencies yet to be installed. These can be piped to a file and
278 downloaded at a later time, using a program like wget.
281 Show less information for certain sync operations. Search will only show
282 package names and not version, group, and description information; list
283 will only show package names and omit databases and versions.
285 *-s, \--search* <'regexp'>::
286 This will search each package in the sync databases for names or
287 descriptions that match `regexp`.
289 *-u, \--sysupgrade*::
290 Upgrades all packages that are out of date. Each currently-installed
291 package will be examined and upgraded if a newer package exists. A
292 report of all packages to upgrade will be presented and the operation
293 will not proceed without user confirmation. Dependencies are
294 automatically resolved at this level and will be installed/upgraded if
297 *-w, \--downloadonly*::
298 Retrieve all packages from the server, but do not install/upgrade
302 Download a fresh copy of the master package list from the server(s)
303 defined in linkman:pacman.conf[5]. This should typically be used each time
304 you use '\--sysupgrade' or '-u'. Passing two '\--refresh' or '-y' flags
305 will force a refresh of all package lists even if they are thought to be up
309 Only install the targets that are not already installed and up-to-date.
311 *\--ignore* <'package'>::
312 Directs pacman to ignore upgrades of package even if there is one
313 available. Multiple packages can be specified by separating them
316 *\--ignoregroup* <'group'>::
317 Directs pacman to ignore upgrades of all packages in 'group' even if
318 there is one available. Multiple groups can be specified by
319 separating them with a comma.
322 Handling Config Files[[HCF]]
323 ----------------------------
324 Pacman uses the same logic as rpm to determine action against files that are
325 designated to be backed up. During an upgrade, 3 md5 hashes are used for each
326 backup file to determine the required action: one for the original file
327 installed, one for the new file that's about to be installed, and one for the
328 actual file existing on the filesystem. After comparing these 3 hashes, the
329 follow scenarios can result:
331 original=X, current=X, new=X::
332 All three files are the same, so overwrites are not an issue Install the
335 original=X, current=X, new=Y::
336 The current file is the same as the original but the new one differs.
337 Since the user did not ever modify the file, and the new one may contain
338 improvements or bugfixes, install the new file.
340 original=X, current=Y, new=X::
341 Both package versions contain the exact same file, but the one on the
342 filesystem has been modified. Leave the current file in place.
344 original=X, current=Y, new=Y::
345 The new file is identical to the current file. Install the new file.
347 original=X, current=Y, new=Z::
348 All three files are different, so install the new file with a '.pacnew'
349 extension and warn the user. The user must then manually merge any
350 necessary changes into the original file.
355 See linkman:pacman.conf[5] for more details on configuring pacman using the
361 linkman:pacman.conf[5], linkman:makepkg[8], linkman:libalpm[3]
363 include::footer.txt[]