Error handling for maximum database size
[pacman-ng.git] / doc / pacman.conf.5.txt
blobcb4c58988c5ea72c2d8492962194745c0f681f37
1 /////
2 vim:set ts=4 sw=4 syntax=asciidoc noet:
3 /////
4 pacman.conf(5)
5 ==============
7 Name
8 ----
9 pacman.conf - pacman package manager configuration file
12 Synopsis
13 --------
14 {sysconfdir}/pacman.conf
17 Description
18 -----------
19 Pacman, using linkman:libalpm[3], will attempt to read pacman.conf each time it
20 is invoked. This configuration file is divided into sections or repositories.
21 Each section defines a package repository that pacman can use when searching
22 for packages in '\--sync' mode. The exception to this is the options section,
23 which defines global options.
26 Example
27 -------
29 --------
31 # pacman.conf
33 [options]
34 NoUpgrade = etc/passwd etc/group etc/shadow
35 NoUpgrade = etc/fstab
37 [core]
38 Include = {sysconfdir}/pacman.d/core
40 [custom]
41 Server = file:///home/pkgs
42 --------
44 NOTE: Each directive must be in CamelCase. If the case isn't respected, the
45 directive won't be recognized. For example. noupgrade or NOUPGRADE will not
46 work.
48 Options
49 -------
50 *RootDir =* path/to/root::
51         Set the default root directory for pacman to install to. This option is
52         used if you want to install a package on a temporary mounted partition
53         which is "owned" by another system, or for a chroot install.
54         *NOTE*: If database path or logfile are not specified on either the
55         command line or in linkman:pacman.conf[5], their default location will
56         be inside this root path.
58 *DBPath =* path/to/db/dir::
59         Overrides the default location of the toplevel database directory.  A
60         typical default is ``{localstatedir}/lib/pacman/''. Most users will not need to set
61         this option. *NOTE*: if specified, this is an absolute path and the root
62         path is not automatically prepended.
64 *CacheDir =* path/to/cache/dir::
65         Overrides the default location of the package cache directory. A typical
66         default is ``{localstatedir}/cache/pacman/pkg/''. Multiple cache directories can be
67         specified, and they are tried in the order they are listed in the config
68         file. If a file is not found in any cache directory, it will be downloaded
69         to the first cache directory with write access. *NOTE*: this is an absolute
70         path, the root path is not automatically prepended.
73 *LogFile =* '/path/to/file'::
74         Overrides the default location of the pacman log file. A typical default
75         is ``{localstatedir}/log/pacman.log''. This is an absolute path and the root directory
76         is not prepended.
78 *HoldPkg =* package ...::
79         If a user tries to '\--remove' a package that's listed in `HoldPkg`,
80         pacman will ask for confirmation before proceeding.
82 *IgnorePkg =* package ...::
83         Instructs pacman to ignore any upgrades for this package when performing
84         a '\--sysupgrade'.
86 *SyncFirst =* package ...::
87         Instructs pacman to check for newer version of these packages before any
88         sync operation. The user will have the choice to either cancel the current
89         operation and upgrade these packages first or go on with the current
90         operation. This option is typically used with the 'pacman' package.
91         *NOTE*: when a `SyncFirst` transaction takes place, no command line flags
92         (e.g. '\--force') are honored. If this is not ideal, disabling `SyncFirst`
93         and performing a manual sync of the involved packages may be required.
95 *IgnoreGroup =* group ...::
96         Instructs pacman to ignore any upgrades for all packages in this
97         group when performing a '\--sysupgrade'.
99 *Include =* path::
100         Include another config file. This file can include repositories or
101         general configuration options. Wildcards in the specified paths will get
102         expanded based on linkman:glob[7] rules.
104 *Architecture =* auto | i686 | x86_64 | ...::
105         If set, pacman will only allow installation of packages of the given
106         architecture (e.g. 'i686', 'x86_64', etc). The special value 'auto' will
107         use the system architecture, provided by in ``uname -m''.  If unset, no
108         architecture checks are made. *NOTE*: packages with the special
109         architecture 'any' can always be installed, as they are meant to be
110         architecture independent.
112 *XferCommand =* /path/to/command %u::
113         If set, an external program will be used to download all remote files.
114         All instances of `%u` will be replaced with the download URL. If present,
115         instances of `%o` will be replaced with the local filename, plus a
116         ``.part'' extension, which allows programs like wget to do file resumes
117         properly.
118         +
119         This option is useful for users who experience problems with built-in
120         http/ftp support, or need the more advanced proxy support that comes with
121         utilities like wget.
123 *NoUpgrade =* file ...::
124         All files listed with a `NoUpgrade` directive will never be touched during
125         a package install/upgrade, and the new files will be installed with a
126         '.pacnew' extension.
127         These files refer to files in the package archive, so do not include the
128         leading slash (the RootDir) when specifying them.
130 *NoExtract =* file ...::
131         All files listed with a `NoExtract` directive will never be extracted from
132         a package into the filesystem. This can be useful when you don't want part
133         of a package to be installed. For example, if your httpd root uses an
134         'index.php', then you would not want the 'index.html' file to be extracted
135         from the 'apache' package.
136         These files refer to files in the package archive, so do not include the
137         leading slash (the RootDir) when specifying them.
139 *CleanMethod =* KeepInstalled &| KeepCurrent::
140         If set to `KeepInstalled` (the default), the '-Sc' operation will clean
141         packages that are no longer installed (not present in the local database).
142         If set to `KeepCurrent`, '-Sc' will clean outdated packages (not present in
143         any sync database).
144         The second behavior is useful when the package cache is shared among
145         multiple machines, where the local databases are usually different, but the
146         sync databases in use could be the same. If both values are specified,
147         packages are only cleaned if not installed locally and not present in any
148         known sync database.
150 *UseSyslog*::
151         Log action messages through syslog(). This will insert log entries into
152         ``{localstatedir}/log/messages'' or equivalent.
154 *ShowSize*::
155         Display the size of individual packages for '\--sync' and '\--query' modes.
157 *UseDelta*::
158         Download delta files instead of complete packages if possible.  Requires
159         the xdelta3 program to be installed.
161 *TotalDownload*::
162         When downloading, display the amount downloaded, download rate, ETA,
163         and completed percentage of the entire download list rather
164         than the percent of each individual download target. The progress
165         bar is still based solely on the current file download.
167 *CheckSpace*::
168         Performs an approximate check for adequate available disk space before
169         installing packages.
171 Repository Sections
172 -------------------
173 Each repository section defines a section name and at least one location where
174 the packages can be found. The section name is defined by the string within
175 square brackets (the two above are 'current'  and  'custom'). Locations are
176 defined with the 'Server' directive and follow a URL naming structure. If you
177 want to use a local directory, you can specify the full path with a ``file://''
178 prefix, as shown above.
180 A common way to define DB locations utilizes the 'Include' directive. For each
181 repository defined in the configuration file, a single 'Include' directive can
182 contain a file that lists the servers for that repository.
184 --------
185 [core]
186 # use this repository first
187 Server = ftp://ftp.archlinux.org/core/os/arch
188 # next use servers as defined in the mirrorlist below
189 Include = {sysconfdir}/pacman.d/mirrorlist
190 --------
192 During parsing, pacman will define the `$repo` variable to the name of the
193 current section. This is often utilized in files specified using the 'Include'
194 directive so all repositories can use the same mirrorfile. pacman also defines
195 the `$arch` variable to the value of `Architecture`, so the same mirrorfile can
196 even be used for different architectures.
198 --------
199 Server = ftp://ftp.archlinux.org/$repo/os/$arch
200 --------
202 The order of repositories in the configuration files matters; repositories
203 listed first will take precedence over those listed later in the file when
204 packages in two repositories have identical names, regardless of version
205 number.
207 Using Your Own Repository
208 -------------------------
209 If you have numerous custom packages of your own, it is often easier to generate
210 your own custom local repository than install them all with the '\--upgrade'
211 option. All you need to do is generate a compressed package database in the
212 directory with these packages so pacman can find it when run with '\--refresh'.
214         repo-add /home/pkgs/custom.db.tar.gz /home/pkgs/*.pkg.tar.gz
216 The above command will generate a compressed database named
217 '/home/pkgs/custom.db.tar.gz'. Note that the database must be of the form
218 '{treename}.db.tar.gz', where '{treename}' is the name of the section defined in
219 the configuration file. That's it! Now configure your custom section in the
220 configuration file as shown in the config example above. Pacman will now use your
221 package repository. If you add new packages to the repository, remember to
222 re-generate the database and use pacman's '\--refresh' option.
224 For more information on the repo-add command, see ``repo-add \--help'' or
225 linkman:repo-add[8].
228 See Also
229 --------
230 linkman:pacman[8], linkman:libalpm[3]
232 include::footer.txt[]