makepkg: Unify start and end messages
[pacman-ng.git] / doc / pacman.8.txt
bloba6bc3d9aba1c4094dee230e7eda13b8881092fca
1 /////
2 vim:set ts=4 sw=4 syntax=asciidoc noet:
3 /////
4 pacman(8)
5 =========
7 Name
8 ----
9 pacman - package manager utility
12 Synopsis
13 --------
14 'pacman' <operation> [options] [packages]
17 Description
18 -----------
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).
29 Operations
30 ----------
31 *-Q, \--query*::
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.
38 *-R, \--remove*::
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.
46 *-S, \--sync*::
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.
66 *-U, \--upgrade*::
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.
71 *-V, \--version*::
72         Display version and exit.
74 *-h, \--help*::
75         Display syntax for the given operation. If no operation was supplied
76         then the general syntax is shown.
79 Options
80 -------
81 *\--asdeps*::
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
85         the package.
87 *\--asexplicit*::
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'
91         remove operation.
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.
99 *-d, \--nodeps*::
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.
104 *-f, \--force*::
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.
119 *-v, --verbose*::
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.
136 *\--noconfirm*::
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.
140 *\--noprogressbar*::
141         Do not show a progress bar when downloading files. This can be useful
142         for scripts that call pacman and capture the output.
144 *\--noscriptlet*::
145         If an install scriptlet exists, do not execute it. Do not use this
146         unless you know what you are doing.
149 Query Options[[QO]]
150 -------------------
151 *-c, \--changelog*::
152         View the ChangeLog of a package. Not every package will provide one but
153         it will be shown if available.
155 *-d, \--deps*::
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.)
161 *-e, \--explicit*::
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.)
167 *-g, \--groups*::
168         Display all packages that are members of a named group. If a name is not
169         specified, list all grouped packages.
171 *-i, \--info*::
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.
177 *-l, \--list*::
178         List all files owned by a given package. Multiple packages can be
179         specified on the command line.
181 *-m, \--foreign*::
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
188         absolute.
190 *-p, \--file*::
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
201         installed package.
203 *-u, \--upgrades*::
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'.
208 Remove Options[[RO]]
209 --------------------
210 *-c, \--cascade*::
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.
215 *-k, \--keep*::
216         Removes the database entry only. Leaves all files in place.
218 *-n, \--nosave*::
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.
223 *-s, \--recursive*::
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.
230 *-u, \--unneeded*::
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.
236 Sync Options[[SO]]
237 ------------------
238 *-c, \--clean*::
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].
252 *-g, \--groups*::
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.
257 *-i, \--info*::
258         Display dependency and other information for a given package. This will
259         search through all repositories for a matching package.
261 *-l, \--list*::
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
280         necessary.
282 *-w, \--downloadonly*::
283         Retrieve all packages from the server, but do not install/upgrade
284         anything.
286 *-y, \--refresh*::
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
291         to date.
293 *\--needed*::
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
299         with a comma.
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
318         new file.
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.
338 Configuration
339 -------------
340 See linkman:pacman.conf[5] for more details on configuring pacman using the
341 'pacman.conf' file.
344 See Also
345 --------
346 linkman:pacman.conf[5], linkman:makepkg[8], linkman:libalpm[3]
348 include::footer.txt[]