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.
67 Upgrade or add a package to the system. Either a URL or file path can be
68 specified. This is a "remove-then-add" process. See <<HCF,Handling Config
69 Files>> for an explanation on how pacman takes care of config files.
72 Display version and exit.
75 Display syntax for the given operation. If no operation was supplied
76 then the general syntax is shown.
82 Install packages non-explicitly; in other words, fake their install reason
83 to be installed as a dependency. This is useful for makepkg and other
84 build from source tools that need to install dependencies before building
88 Install packages explicitly; in other words, fake their install reason to
89 be explicitly installed. This is useful if you want to mark a dependency
90 as explicitly installed so it will not be removed by the '\--recursive'
93 *-b, \--dbpath* <'path'>::
94 Specify an alternative database location (a typical default is
95 ``/var/lib/pacman''). This should not be used unless you know what you are
96 doing. *NOTE*: if specified, this is an absolute path and the root path is
97 not automatically prepended. This behavior changed in pacman 3.1.0.
100 Skips all dependency checks. Normally, pacman will always check a
101 package's dependency fields to ensure that all dependencies are
102 installed and there are no package conflicts in the system.
105 Bypass file conflict checks and overwrite conflicting files. If the
106 package that is about to be installed contains files that are already
107 installed, this option will cause all those files to be overwritten.
108 This option should be used with care, ideally not at all.
110 *-r, \--root* <'path'>::
111 Specify an alternative installation root (default is ``/''). This should
112 not be used as a way to install software into ``/usr/local'' instead of
113 ``/usr''. This option is used if you want to install a package on a
114 temporary mounted partition which is "owned" by another system.
115 *NOTE*: If database path or logfile are not specified on either the
116 command line or in linkman:pacman.conf[5], their default location will
117 be inside this root path.
120 Output paths such as as the Root, Conf File, DB Path, Cache Dirs, etc.
122 *\--cachedir* <'dir'>::
123 Specify an alternative package cache location (a typical default is
124 ``/var/cache/pacman/pkg''). Multiple cache directories can be specified,
125 and they are tried in the order they are passed to pacman. *NOTE*: this
126 is an absolute path, the root path is not automatically prepended. This
127 behavior changed in pacman 3.1.0.
129 *\--config* <'file'>::
130 Specify an alternate configuration file.
132 *\--logfile* <'file'>::
133 Specify an alternate log file. This is an absolute path, regardless of
134 the installation root setting.
137 Bypass any and all "Are you sure?" messages. It's not a good idea to do
138 this unless you want to run pacman from a script.
141 Do not show a progress bar when downloading files. This can be useful
142 for scripts that call pacman and capture the output.
145 If an install scriptlet exists, do not execute it. Do not use this
146 unless you know what you are doing.
152 View the ChangeLog of a package. Not every package will provide one but
153 it will be shown if available.
156 List all packages installed as dependencies. This option can be combined
157 with '-t' for listing real orphans- packages that were installed as
158 dependencies but are no longer required by any installed package. ('-Qdt'
159 is equivalent to the pacman 3.0.X '-Qe' option.)
162 List all packages explicitly installed. This option can be combined with
163 '-t' to list top-level packages- those packages that were explicitly
164 installed but are not required by any other package. ('-Qet' is equivalent
165 to the pacman 2.9.X '-Qe' option.)
168 Display all packages that are members of a named group. If a name is not
169 specified, list all grouped packages.
172 Display information on a given package. The '-p' option can be used if
173 querying a package file instead of the local database. Passing two
174 '\--info' or '-i' flags will also display the list of backup files and
175 their modification states.
178 List all files owned by a given package. Multiple packages can be
179 specified on the command line.
182 Restrict or filter output to packages that were not found in the sync
183 database(s). Typically these are packages that were downloaded manually
184 and installed with '\--upgrade'.
186 *-o, \--owns* <'file'>::
187 Search for the package that owns file. The path can be relative or
191 Signifies that the package supplied on the command line is a file and
192 not an entry in the database. The file will be decompressed and queried.
193 This is useful in combination with '\--info' and '\--list'.
195 *-s, \--search* <'regexp'>::
196 This will search each locally-installed package for names or
197 descriptions that match `regexp`.
199 *-t, \--unrequired*::
200 Restrict or filter output to packages not required by any currently
204 Lists all packages that are out of date on the local system. This option
205 works best if the sync database is refreshed using '-Sy'.
211 Remove all target packages, as well as all packages that depend on one
212 or more target packages. This operation is recursive, and must be used
213 with care since it can remove many potentially needed packages.
216 Removes the database entry only. Leaves all files in place.
219 Instructs pacman to ignore file backup designations. Normally, when a
220 file is removed from the system the database is checked to see if the
221 file should be renamed with a ``.pacsave'' extension.
224 Remove each target specified including all of their dependencies, provided
225 that (A) they are not required by other packages; and (B) they were not
226 explicitly installed by the user. This operation is recursive and analogous
227 to a backwards '\--sync' operation, and helps keep a clean system without
228 orphans. If you want to omit condition (B), pass this option twice.
231 Removes the targets that are not required by any other packages.
232 This is mostly useful when removing a group without using the '-c' option,
233 to avoid breaking any dependencies.
239 Remove packages that are no longer installed from the cache as well as
240 currently unused sync databases to free up disk space. When pacman
241 downloads packages, it saves them in a cache directory. In addition,
242 databases are saved for every sync DB you download from, and are not
243 deleted even if they are removed from the configuration file
244 linkman:pacman.conf[5]. Use one '\--clean' switch to only remove
245 packages that are no longer installed; use two to remove all packages
246 from the cache. In both cases, you will have a yes or no option to
247 remove packages and/or unused downloaded databases.
249 If you use a network shared cache, see the 'CleanMethod' option in
250 linkman:pacman.conf[5].
253 Display all the members for each package group specified. If no group
254 names are provided, all groups will be listed; pass the flag twice to
255 view all groups and their members.
258 Display dependency and other information for a given package. This will
259 search through all repositories for a matching package.
262 List all packages in the specified repositories. Multiple repositories
263 can be specified on the command line.
265 *-p, \--print-uris*::
266 Print out URIs for each package that will be installed, including any
267 dependencies yet to be installed. These can be piped to a file and
268 downloaded at a later time, using a program like wget.
270 *-s, \--search* <'regexp'>::
271 This will search each package in the sync databases for names or
272 descriptions that match `regexp`.
274 *-u, \--sysupgrade*::
275 Upgrades all packages that are out of date. Each currently-installed
276 package will be examined and upgraded if a newer package exists. A
277 report of all packages to upgrade will be presented and the operation
278 will not proceed without user confirmation. Dependencies are
279 automatically resolved at this level and will be installed/upgraded if
282 *-w, \--downloadonly*::
283 Retrieve all packages from the server, but do not install/upgrade
287 Download a fresh copy of the master package list from the server(s)
288 defined in linkman:pacman.conf[5]. This should typically be used each time
289 you use '\--sysupgrade' or '-u'. Passing two '\--refresh' or '-y' flags
290 will force a refresh of all package lists even if they are thought to be up
294 Only install the targets that are not already installed and up-to-date.
296 *\--ignore* <'package'>::
297 Directs pacman to ignore upgrades of package even if there is one
298 available. Multiple packages can be specified by separating them
301 *\--ignoregroup* <'group'>::
302 Directs pacman to ignore upgrades of all packages in 'group' even if
303 there is one available. Multiple groups can be specified by
304 separating them with a comma.
307 Handling Config Files[[HCF]]
308 ----------------------------
309 Pacman uses the same logic as rpm to determine action against files that are
310 designated to be backed up. During an upgrade, 3 md5 hashes are used for each
311 backup file to determine the required action: one for the original file
312 installed, one for the new file that's about to be installed, and one for the
313 actual file existing on the filesystem. After comparing these 3 hashes, the
314 follow scenarios can result:
316 original=X, current=X, new=X::
317 All three files are the same, so overwrites are not an issue Install the
320 original=X, current=X, new=Y::
321 The current file is the same as the original but the new one differs.
322 Since the user did not ever modify the file, and the new one may contain
323 improvements or bugfixes, install the new file.
325 original=X, current=Y, new=X::
326 Both package versions contain the exact same file, but the one on the
327 filesystem has been modified. Leave the current file in place.
329 original=X, current=Y, new=Y::
330 The new file is identical to the current file. Install the new file.
332 original=X, current=Y, new=Z::
333 All three files are different, so install the new file with a '.pacnew'
334 extension and warn the user. The user must then manually merge any
335 necessary changes into the original file.
340 See linkman:pacman.conf[5] for more details on configuring pacman using the
346 linkman:pacman.conf[5], linkman:makepkg[8], linkman:libalpm[3]
348 include::footer.txt[]