1yum.conf(5) yum configuration file yum.conf(5)
2
3
4
6 yum.conf - Configuration file for yum(8).
7
9 Yum uses a configuration file at /etc/yum/yum.conf.
10
11 Additional configuration files are also read from the directories set
12 by the reposdir option (default is `/etc/yum/repos.d'). See the repos‐
13 dir option below for further details.
14
15
17 There are two types of sections in the yum configuration file(s): main
18 and repository. Main defines all global configuration options. There
19 should be only one main section. The repository section(s) define the
20 configuration for each repository/server. There should be one or more
21 repository sections.
22
23
25 The [main] section must exist for yum to do anything. It consists of
26 the following options:
27
28
29 cachedir
30 Directory where yum should store its cache and db files. The
31 default is `/var/cache/yum'.
32
33
34 persistdir
35 Directory where yum should store information that should persist
36 over multiple runs. The default is `/var/lib/yum'.
37
38
39 keepcache
40 Either `1' or `0'. Determines whether or not yum keeps the cache
41 of headers and packages after succesful installation. Default
42 is '1' (keep files)
43
44
45 reposdir
46 A list of directories where yum should look for .repo files
47 which define repositories to use. Default is `/etc/yum/repos.d'.
48 Each file in this directory should contain one or more reposi‐
49 tory sections as documented in [repository] options below. These
50 will be merged with the repositories defined in
51 /etc/yum/yum.conf to form the complete set of repositories that
52 yum will use.
53
54
55 debuglevel
56 Debug message output level. Practical range is 0-10. Default is
57 `2'.
58
59
60 errorlevel
61 Error message output level. Practical range is 0-10. Default is
62 `2'.
63
64
65 logfile
66 Full directory and file name for where yum should write its log
67 file.
68
69
70 gpgcheck
71 Either `1' or `0'. This tells yum whether or not it should per‐
72 form a GPG signature check on packages. When this is set in the
73 [main] section it sets the default for all repositories. This
74 option also determines whether or not an install of a package
75 from a local RPM file will be GPG signature checked. The default
76 is `0'.
77
78
79 assumeyes
80 Either `1' or `0'. Determines whether or not yum prompts for
81 confirmation of critical actions. Default is `0' (do prompt).
82 Commmand-line option: -y
83
84
85 alwaysprompt
86 Either `1' or `0'. Without this option, yum will not prompt for
87 confirmation when the list of packages to be installed exactly
88 matches those given on the command line. Unless assumeyes is
89 enabled, it will still prompt for package removal, or when addi‐
90 tional packages need to be installed to fulfill dependencies.
91 Default is `1'.
92
93
94 tolerant
95 Either `1' or `0'. If enabled, then yum will be tolerant of
96 errors on the command line with regard to packages. For example:
97 if you request to install foo, bar and baz and baz is installed;
98 yum won't error out complaining that baz is already installed.
99 Default to `0' (not tolerant).
100 Commmand-line option: -t
101
102
103 exclude
104 List of packages to exclude from updates or installs. This
105 should be a space separated list. Shell globs using wildcards
106 (eg. * and ?) are allowed.
107
108
109 exactarch
110 Either `1' or `0'. Set to `1' to make yum update only update the
111 architectures of packages that you have installed. ie: with this
112 enabled yum will not install an i686 package to update an i386
113 package. Default is `1'.
114
115
116 installonlypkgs
117 List of packages that should only ever be installed, never
118 updated. Kernels in particular fall into this category. Defaults
119 to kernel, kernel-smp, kernel-bigmem, kernel-enterprise, kernel-
120 debug, kernel-unsupported.
121
122
123 installonly_limit
124 Number of packages listed in installonlypkgs to keep installed
125 at the same time. Setting to 0 disables this feature. Default is
126 '2'.
127
128
129 kernelpkgnames
130 List of package names that are kernels. This is really only here
131 for the updating of kernel packages and should be removed out in
132 the yum 2.1 series.
133
134
135 showdupesfromrepos
136 Either `0' or `1'. Set to `1' if you wish to show any duplicate
137 packages from any repository. Set to `0' if you want only to see
138 the newest packages from any repository. Default is `0'.
139
140
141 obsoletes
142 This option only has affect during an update. It enables yum's
143 obsoletes processing logic. Useful when doing distribution level
144 upgrades. See also the yum upgrade command documentation for
145 more details (yum(8)).
146 Commmand-line option: --obsoletes
147
148
149 overwrite_groups
150 Either `0' or `1'. Used to determine yum's behaviour if two or
151 more repositories offer the package groups with the same name.
152 If overwrite_groups is `1' then the group packages of the last
153 matching repository will be used. If overwrite_groups is `0'
154 then the groups from all matching repositories will be merged
155 together as one large group.
156
157
158 enable_group_conditionals
159 Either `0' or `1'. Determines whether yum will allow the use of
160 conditionals packages. Default is `1' (package conditionals are
161 allowed).
162
163
164 group_package_types
165 List of the following: optional, default, mandatory. Tells yum
166 which type of packages in groups will be installed when
167 'groupinstall' is called. Default is: default, mandatory
168
169
170 installroot
171 Specifies an alternative installroot, relative to which all
172 packages will be installed.
173 Commmand-line option: --installroot
174
175
176 distroverpkg
177 The package used by yum to determine the "version" of the dis‐
178 tribution. This can be any installed package. Default is `red‐
179 hat-release'.
180
181
182 diskspacecheck
183 Either `0' or `1'. Set this to `0' to disable the checking for
184 sufficient diskspace before a RPM transaction is run. Default is
185 `1' (perform the check).
186
187
188 tsflags
189 Comma or space separated list of transaction flags to pass to
190 the rpm transaction set. These include 'noscripts', 'notrig‐
191 gers', 'nodocs', 'test', and 'repackage'. You can set all/any
192 of them. However, if you don't know what these do in the context
193 of an rpm transaction set you're best leaving it alone. Default
194 is an empty list.
195
196
197 recent Number of days back to look for `recent' packages added to a
198 repository. Used by the list recent command. Default is `7'.
199
200
201 retries
202 Set the number of times any attempt to retrieve a file should
203 retry before returning an error. Setting this to `0' makes yum
204 try forever. Default is `6'.
205
206
207 keepalive
208 Either `0' or `1'. Set whether HTTP keepalive should be used for
209 HTTP/1.1 servers that support it. This can improve transfer
210 speeds by using one connection when downloading multiple files
211 from a repository. Default is `1'.
212
213
214 timeout
215 Number of seconds to wait for a connection before timing out.
216 Defaults to 30 seconds. This may be too short of a time for
217 extremely overloaded sites.
218
219
220 http_caching
221 Determines how upstream HTTP caches are instructed to handle any
222 HTTP downloads that Yum does. This option can take the following
223 values:
224
225 `all' means that all HTTP downloads should be cached.
226
227 `packages' means that only RPM package downloads should be
228 cached (but not repository metadata downloads).
229
230 `none' means that no HTTP downloads should be cached.
231
232 The default is `all'. This is recommended unless you are experi‐
233 encing caching related issues. Try to at least use `packages' to
234 minimise load on repository servers.
235
236
237 throttle
238 Enable bandwidth throttling for downloads. This option can be
239 expressed as a absolute data rate in bytes/sec. An SI prefix (k,
240 M or G) may be appended to the bandwidth value (eg. `5.5k' is
241 5.5 kilobytes/sec, `2M' is 2 Megabytes/sec).
242
243 Alternatively, this option can specify the percentage of total
244 bandwidth to use (eg. `60%'). In this case the bandwidth option
245 should be used to specify the maximum available bandwidth.
246
247 Set to `0' to disable bandwidth throttling. This is the default.
248
249
250 bandwidth
251 Use to specify the maximum available network bandwidth in
252 bytes/second. Used with the throttle option (above). If throt‐
253 tle is a percentage and bandwidth is `0' then bandwidth throt‐
254 tling will be disabled. If throttle is expressed as a data rate
255 (bytes/sec) then this option is ignored. Default is `0' (no
256 bandwidth throttling).
257
258
259 commands
260 List of functional commands to run if no functional commands are
261 specified on the command line (eg. "update foo bar baz quux").
262 None of the short options (eg. -y, -e, -d) are accepted for this
263 option.
264
265
266
267
268 proxy url to the proxy server that yum should use.
269
270
271 proxy_username
272 username to use for proxy
273
274
275 proxy_password
276 password for this proxy
277
278
279 plugins
280 Either `0' or `1'. Global switch to enable or disable yum plug‐
281 ins. Default is `0' (plugins disabled). See the PLUGINS section
282 of the yum(8) man for more information on installing yum plug‐
283 ins.
284
285
286 pluginpath
287 A list of directories where yum should look for plugin modules.
288 Default is `/usr/share/yum-plugins' and `/usr/lib/yum-plugins'.
289
290
291 pluginconfpath
292 A list of directories where yum should look for plugin configu‐
293 ration files. Default is `/etc/yum/pluginconf.d'.
294
295
296 metadata_expire
297 Time (in seconds) after which the metadata will expire. So that
298 if the current metadata downloaded is less than this many sec‐
299 onds old then yum will not update the metadata against the
300 repository. If you find that yum is not downloading information
301 on updates as often as you would like lower the value of this
302 option.
303
304
305 mirrorlist_expire
306 Time (in seconds) after which the mirrorlist locally cached will
307 expire. If the current mirrorlist is less than this many sec‐
308 onds old then yum will not download another copy of the mir‐
309 rorlist If you find that yum is not downloading the mirrorlists
310 as often as you would like lower the value of this option.
311
312
314 The repository section(s) take the following form:
315
316 Example:
317 [repositoryid]
318 name=Some name for this repository
319 baseurl=url://path/to/repository/
320
321
322 repositoryid
323 Must be a unique name for each repository, one word.
324
325
326 name A human readable string describing the repository.
327
328
329 baseurl
330 Must be a URL to the directory where the yum repository's `repo‐
331 data' directory lives. Can be an http://, ftp:// or file:// URL.
332 You can specify multiple URLs in one baseurl statement. The best
333 way to do this is like this:
334 [repositoryid]
335 name=Some name for this repository
336 baseurl=url://server1/path/to/repository/
337 url://server2/path/to/repository/
338 url://server3/path/to/repository/
339
340 If you list more than one baseurl= statement in a repository you
341 will find yum will ignore the earlier ones and probably act
342 bizarrely. Don't do this, you've been warned.
343
344 You can use HTTP basic auth by prepending "user:password@" to
345 the server name in the baseurl line. For example:
346 "baseurl=http://user:passwd@example.com/".
347
348
349 mirrorlist
350 Specifies a URL to a file containing a list of baseurls. This
351 can be used instead of or with the baseurl option. Substitution
352 variables, described below, can be used with this option.
353
354
355 enabled
356 Either `1' or `0'. This tells yum whether or not use this repos‐
357 itory.
358
359
360 gpgcheck
361 Either `1' or `0'. This tells yum whether or not it should per‐
362 form a GPG signature check on the packages gotten from this
363 repository.
364
365
366 gpgkey A URL pointing to the ASCII-armoured GPG key file for the repos‐
367 itory. This option is used if yum needs a public key to verify a
368 package and the required key hasn't been imported into the RPM
369 database. If this option is set, yum will automatically import
370 the key from the specified URL. You will be prompted before the
371 key is installed unless the assumeyes option is set.
372
373 Multiple URLs may be specified here in the same manner as the
374 baseurl option (above). If a GPG key is required to install a
375 package from a repository, all keys specified for that reposi‐
376 tory will be installed.
377
378
379 exclude
380 Same as the [main] exclude option but only for this repository.
381 Substitution variables, described below, are honored here.
382
383
384 includepkgs
385 Inverse of exclude. This is a list of packages you want to use
386 from a repository. If this option lists only one package then
387 that is all yum will ever see from the repository. Defaults to
388 an empty list. Substitution variables, described below, are
389 honored here.
390
391
392 enablegroups
393 Either `0' or `1'. Determines whether yum will allow the use of
394 package groups for this repository. Default is `1' (package
395 groups are allowed).
396
397
398 failovermethod
399 Either `roundrobin' or `priority'.
400
401 `roundrobin' randomly selects a URL out of the list of URLs to
402 start with and proceeds through each of them as it encounters a
403 failure contacting the host.
404
405 `priority' starts from the first baseurl listed and reads
406 through them sequentially.
407
408 failovermethod defaults to `roundrobin' if not specified.
409
410
411 keepalive
412 Either `1' or `0'. This tells yum whether or not HTTP/1.1
413 keepalive should be used with this repository. See the global
414 option in the [main] section above for more information.
415
416
417 timeout
418 Overrides the timeout option from the [main] section for this
419 repository.
420
421
422 http_caching
423 Overrides the http_caching option from the [main] section for
424 this repository.
425
426
427 retries
428 Overrides the retries option from the [main] section for this
429 repository.
430
431
432 throttle
433 Overrides the throttle option from the [main] section for this
434 repository.
435
436
437 bandwidth
438 Overrides the bandwidth option from the [main] section for this
439 repository.
440
441
442 metadata_expire
443 Overrides the metadata_expire option from the [main] section for
444 this repository.
445
446
447 mirrorlist_expire
448 Overrides the mirrorlist_expire option from the [main] section
449 for this repository.
450
451
452 proxy url to the proxy server for this repository. Set to '_none_' to
453 disable the global proxy setting for this repository. If this is
454 unset it inherits it from the global setting
455
456
457 proxy_username
458 username to use for proxy. If this is unset it inherits it from
459 the global setting
460
461
462 proxy_password
463 password for this proxy. If this is unset it inherits it from
464 the global setting
465
466
467 cost relative cost of accessing this repository. Useful for weighing
468 one repo's packages as greater/less than any other. defaults to
469 1000
470
471
473 The inclusion of external configuration files is supported for
474 /etc/yum/yum.conf and the .repo files in the /etc/yum/repos.d direc‐
475 tory. To include a URL, use a line of the following format:
476
477 include=url://to/some/location
478
479 The configuration file will be inserted at the position of the
480 "include=" line. Included files may contain further include lines. Yum
481 will abort with an error if an inclusion loop is detected.
482
483
485 There are a number of variables you can use to ease maintenance of
486 yum's configuration files. They are available in the values of several
487 options including name, baseurl and commands.
488
489 $releasever
490 This will be replaced with the value of the version of the pack‐
491 age listed in distroverpkg. This defaults to the version of
492 `redhat-release' package.
493
494
495 $arch This will be replaced with your architecture as listed by
496 os.uname()[4] in Python.
497
498
499 $basearch
500 This will be replaced with your base architecture in yum. For
501 example, if your $arch is i686 your $basearch will be i386.
502
503
504 $YUM0-$YUM9
505 These will be replaced with the value of the shell environment
506 variable of the same name. If the shell environment variable
507 does not exist then the configuration file variable will not be
508 replaced.
509
510
511
513 /etc/yum/yum.conf
514 /etc/yum/repos.d/
515 /etc/yum/pluginconf.d/
516
517
519 yum(8)
520
521
522
523
524Seth Vidal yum.conf(5)