Bugfixes in prep for a 3.0.2 release
[pacman.git] / doc / pacman.8
blob79097783cb00c6598234d4627096fb152ead97f8
1 ." the string declarations are a start to try and make distro independent
2 .ds DS Arch Linux
3 .ds PB PKGBUILD
4 .ds VR 3.0.0
5 .ds LV 1.0.0
6 .TH pacman 8 "Feb 07, 2007" "pacman version \*(VR" "\*(DS Utilities"
7 .SH NAME
8 pacman \- package manager utility
10 .SH SYNOPSIS
11 .B pacman
12 <\fIoperation\fR> [\fIoptions\fR] [\fIpackages\fR]
14 .SH DESCRIPTION
15 \fBpacman\fP is a \fIpackage management\fP utility that tracks installed
16 packages on a Linux system. It features dependency support, package groups,
17 install and uninstall hooks, and the ability to sync your local machine with a
18 remote ftp server to automatically upgrade packages. \fBpacman\fP packages are
19 a zipped tar format.
21 Since version 3.0.0, \fBpacman\fP has been the frontend to \fBlibalpm\fP, the
22 "Arch Linux Package Management" library. This library allows alternative front
23 ends to be written (for instance, a GUI front end).
25 .SH OPERATIONS
26 .TP
27 .B \-A, --add (deprecated)
28 Add a package to the system. Either a URL or file path can be specified. The
29 package will be uncompressed into the installation root and the database will
30 be updated. The package will not be installed if another version is already
31 installed. NOTE: please use \fB--upgrade\fP in place of this option.
32 .TP
33 .B \-F, --freshen
34 This is like \fB--upgrade\fP except it will only upgrade packages already
35 installed on the system.
36 .TP
37 .B \-Q, --query
38 Query the package database. This operation allows you to view installed
39 packages and their files, as well as meta-information about individual packages
40 (dependencies, conflicts, install date, build date, size). This can be run
41 against the local package database or can be used on individual .tar.gz
42 packages. See \fBQUERY OPTIONS\fP below.
43 .TP
44 .B \-R, --remove
45 Remove a package from the system. Files belonging to the specified package
46 will be deleted, and the database will be updated. Most configuration files
47 will be saved with a \fI.pacsave\fP extension unless the \fB--nosave\fP option
48 is used. See \fBREMOVE OPTIONS\fP below.
49 .TP
50 .B \-S, --sync
51 Synchronize packages. Packages are installed directly from the ftp servers,
52 including all dependencies required to run the packages. For example,
53 \fBpacman -S qt\fP will download and install \fBqt\fP and all the packages it
54 depends on. You can also use \fBpacman -Su\fP to upgrade all packages that are
55 out of date. See \fBSYNC OPTIONS\fP below.
56 .TP
57 .B \-U, --upgrade
58 Upgrade or add a package to the system. Either a URL or file path can be
59 specified. This is a "remove-then-add" process. See \fBHANDLING CONFIG
60 FILES\fP for an explanation on how pacman takes care of config files.
61 .TP
62 .B \-V, --version
63 Display version and exit.
64 .TP
65 .B \-h, --help
66 Display syntax for the given operation. If no operation was supplied then the
67 general syntax is shown.
69 .SH OPTIONS
70 .TP
71 .B \--ask \fInumber\fP
72 Pre-specify answers to questions. It is doubtful whether this option even
73 works, so I would not recommend using it. TODO: document this more, as I have
74 no idea how it works or when you would use it, or if we should just dump it.
75 .TP
76 .B \-b, --dbpath \fIpath\fP
77 Specify an alternative database location (default is "/var/lib/pacman/"). This
78 should not be used unless you know what you are doing.
79 .TP
80 .B \-d, --nodeps
81 Skips all dependency checks. Normally, pacman will always check a package's
82 dependency fields to ensure that all dependencies are installed and there are
83 no package conflicts in the system.
84 .TP
85 .B \-f, --force
86 Bypass file conflict checks and overwrite conflicting files. If the package
87 that is about to be installed contains files that are already installed, this
88 option will cause all those files to be overwritten.  This option should be
89 used with care, ideally not at all.
90 .TP
91 .B \-r, --root \fIpath\fP
92 Specify an alternative installation root (default is "/"). This should
93 \fInot\fP be used as a way to install software into /usr/local instead of /usr.
94 This option is used if you want to install a package on a temporary mounted
95 partition which is "owned" by another system. By using this option you not only
96 specify where the software should be installed, but you also specify which
97 package database and cache location to use.
98 .TP
99 .B \-v, --verbose
100 Output more status messages, such as the Root and DBPath.
102 .B \--cachedir \fIdir\fP
103 Specify an alternative package cache location (default is
104 "/var/cache/pacman/pkg/"). This should not be used unless you know what you are
105 doing.
107 .B \--config \fIfilepath\fP
108 Specify an alternate configuration file.
110 .B \--noconfirm
111 Bypass any and all "Are you sure?" messages. It's not a good idea to do this
112 unless you want to run pacman from a script.
114 .B \--noprogressbar
115 Do not show a progress bar when downloading files. This can be useful for
116 scripts that call pacman and capture the output.
118 .B \--noscriptlet
119 If an install scriptlet exists, do not execute it. Do not use this unless you
120 know what you are doing.
122 .SH QUERY OPTIONS
124 .B \-c, --changelog
125 View the ChangeLog of a package. Not every package will provide one but it
126 will be shown if available.
128 .B \-e, --orphans
129 List all packages that were pulled in by a previously installed package but no
130 longer required by any installed package.
132 .B \-g, --groups
133 Display all packages that are members of a named group. If not name is
134 specified, list all grouped packages.
136 .B \-i, --info
137 Display information on a given package. The \fB-p\fP option can be used if
138 querying a package file instead of the local database.
140 .B \-l, --list
141 List all files owned by a given package. Multiple packages can be specified on
142 the command line.
144 .B \-m, --foreign
145 List all packages that were not found in the sync database(s). Typically these
146 are packages that were downloaded manually and installed with \fB--upgrade\fP.
148 .B \-o, --owns \fIfile\fP
149 Search for the package that owns \fIfile\fP.
151 .B \-p, --file
152 Signifies that the package supplied on the command line is a file and not an
153 entry in the database. The file will be decompressed and queried. This is
154 useful in combination with \fB--info\fP and \fB--list\fP.
156 .B \-s, --search \fIregexp\fP
157 This will search each locally-installed package for names or descriptions that
158 matche \fIregexp\fP.
160 .B \-u, --upgrades
161 Lists all packages that are out of date on the local system. This option works
162 best if the sync database is refreshed using \fB-Sy\fP.
164 .SH REMOVE OPTIONS
166 .B \-c, --cascade
167 Remove all target packages, as well as all packages that depend on one or more
168 target packages. This operation is recursive.
170 .B \-k, --keep
171 Removes the database entry only. Leaves all files in place.
173 .B \-n, --nosave
174 Instructs pacman to ignore file backup designations.  Normally, when a file is
175 removed from the system the database is checked to see if the file should be
176 renamed with a .pacsave extension.
178 .B \-s, --recursive
179 Remove each target specified including all dependencies, provided that (A) they
180 are not required by other packages; and (B) they were not explicitly installed
181 by the user.  This option is analogous to a backwards \fB--sync\fP operation.
183 .SH SYNC OPTIONS
185 .B \-c, --clean
186 Remove old packages from the cache to free up disk space. When \fBpacman\fP
187 downloads packages, it saves them in \fI/var/cache/pacman/pkg\fP. Use one
188 \fB--clean\fP switch to remove \fIold\fP packages; use two to remove \fIall\fP
189 packages from the cache.
191 .B \-e, --dependsonly
192 Install all dependencies of a package, but not the specified package itself.
193 This is pretty useless and we're not sure why it even exists.
195 .B \-g, --groups
196 Display all the members for each package group specified. If no group names
197 are provided, all groups will be listed; pass the flag twice to view all
198 groups and their members.
200 .B \-i, --info
201 Display dependency and other information for a given package. This will search
202 through all repositories for a matching package.
204 .B \-l, --list
205 List all packages in the specified repositories. Multiple repositories can be
206 specified on the command line.
208 .B \-p, --print-uris
209 Print out URIs for each package that will be installed, including any
210 dependencies yet to be installed. These can be piped to a file and downloaded
211 at a later time, using a program like wget.
213 .B \-s, --search \fIregexp\fP
214 This will search each package in the sync databases for names or descriptions
215 that match \fIregexp\fP.
217 .B \-u, --sysupgrade
218 Upgrades all packages that are out of date. Each currently-installed package
219 will be examined and upgraded if a newer package exists. A report of all
220 packages to upgrade will be presented and the operation will not proceed
221 without user confirmation. Dependencies are automatically resolved at this
222 level and will be installed/upgraded if necessary.
224 .B \-w, --downloadonly
225 Retrieve all packages from the server, but do not install/upgrade anything.
227 .B \-y, --refresh
228 Download a fresh copy of the master package list from the server(s) defined in
229 \fBpacman.conf\fP. This should typically be used each time you use
230 \fB--sysupgrade\fP or \fB-u\fP. Passing two \fB--refresh\fP or \fB-y\fP flags
231 will force a refresh of all package lists even if they are thought to be
232 up to date.
234 .B \--ignore \fIpackage\fP
235 Directs \fBpacman\fP to ignore upgrades of \fIpackage\fP even if there is one
236 available.
238 .SH HANDLING CONFIG FILES
239 pacman uses the same logic as rpm to determine action against files that are
240 designated to be backed up. During an upgrade, 3 md5 hashes are used for each
241 backup file to determine the required action: one for the original file
242 installed, one for the new file that's about to be installed, and one for the
243 actual file existing on the filesystem. After comparing these 3 hashes, the
244 follow scenarios can result:
246 original=\fBX\fP, current=\fBX\fP, new=\fBX\fP
247 All three files are the same, so overwrites are not an issue Install the new
248 file.
250 original=\fBX\fP, current=\fBX\fP, new=\fBY\fP
251 The current file is the same as the original but the new one differs.  Since
252 the user did not ever modify the file, and the new one may contain improvements
253 or bugfixes, install the new file.
255 original=\fBX\fP, current=\fBY\fP, new=\fBX\fP
256 Both package versions contain the exact same file, but the one on the
257 filesystem has been modified. Leave the current file in place.
259 original=\fBX\fP, current=\fBY\fP, new=\fBY\fP
260 The new file is identical to the current file. Install the new file.
262 original=\fBX\fP, current=\fBY\fP, new=\fBZ\fP
263 All three files are different, so install the new file with a .pacnew extension
264 and warn the user. The user must then manually merge any necessary changes into
265 the original file.
267 .SH CONFIGURATION
269 .BR pacman.conf (5)
270 for more details on configuring \fBpacman\fP using the \fBpacman.conf\fP file.
272 .SH BUGS
273 Bugs? You must be kidding, there are no bugs in this software. But if we happen
274 to be wrong, send us an email with as much detail as possible to
275 <pacman-dev@archlinux.org>.
277 .SH SEE ALSO
278 .BR pacman.conf (5),
279 .BR makepkg (8),
280 .BR libalpm (3)
282 See the Arch Linux website at <http://www.archlinux.org> for more current
283 information on the distribution and the \fBpacman\fP family of tools.
285 .SH AUTHORS
287 Judd Vinet <jvinet@zeroflux.org>
288 Aurelien Foret <aurelien@archlinux.org>
289 Aaron Griffin <aaron@archlinux.org>
290 Dan McGee <dan@archlinux.org>
293 See the 'AUTHORS' file for additional contributors.