Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 3. Configuring YUM


The configuration information for YUM and related utilities is stored in the /etc/yum.conf file. This file contains a mandatory [main] section that you can use to set YUM options that have global effect.

3.1. Viewing the current YUM configurations

The [main] section in the /etc/yum.conf file contains only the settings that have been explicitly set. However, you can display all settings of the [main] section, including the ones that have not been set and which, therefore, use their default values.

Procedure

  • Display the global YUM configuration:

    # yum config-manager --dump
    Copy to Clipboard Toggle word wrap

3.2. Setting YUM main options

The /etc/yum.conf configuration file contains one [main] section. The key-value pairs in this section affect how YUM operates and treats repositories.

Procedure

  1. Edit the /etc/yum.conf file.
  2. Update the [main] section according to your requirements.
  3. Save the changes.

3.3. Enabling and disabling YUM plug-ins

In the YUM tool, plug-ins are loaded by default. However, you can influence which plug-ins YUM loads.

Warning

Disable all plug-ins only for diagnosing a potential problem. YUM requires certain plug-ins, such as product-id and subscription-manager, and disabling them causes Red Hat Enterprise Linux to not be able to install or update software from the Content Delivery Network (CDN).

Procedure

  • Use one of the following methods to influence how YUM uses plug-ins:

    • To enable or disable loading of YUM plug-ins globally, add the plugins parameter to the [main] section of the /etc/dnf/dnf.conf file.

      • Set plugins=1 (default) to enable loading of all YUM plug-ins.
      • Set plugins=0 to disable loading of all YUM plug-ins.
    • To disable a particular plug-in, add enabled=False to the [main] section in the /etc/dnf/plugins/<plug-in_name>.conf file.
    • To disable all YUM plug-ins for a particular command, append the --noplugins option to the command. For example, to disable YUM plug-ins for a single update command, enter:

      # yum --noplugins update
      Copy to Clipboard Toggle word wrap
    • To disable certain YUM plug-ins for a single command, append the --disableplugin=plugin-name option to the command. For example, to disable a certain YUM plug-in for a single update command, enter:

      # yum update --disableplugin=<plugin_name>
      Copy to Clipboard Toggle word wrap
    • To enable certain YUM plug-ins for a single command, append the --enableplugin=plugin-name option to the command. For example, to enable a certain YUM plug-in for a single update command, enter:

      # yum update --enableplugin=<plugin_name>
      Copy to Clipboard Toggle word wrap

3.4. Excluding packages from YUM operations

You can configure YUM to exclude packages from any YUM operation by using the excludepkgs option. You can define excludepkgs in the [main] or the repository section of the /etc/yum.conf file.

Note

You can temporarily disable excluding the configured packages from an operation by using the --disableexcludes option.

Procedure

  • Exclude packages from the YUM operation by adding the following line to the /etc/yum.conf file:

    excludepkgs=<package_name_1>,<package_name_2> ...
    Copy to Clipboard Toggle word wrap

    Alternatively, use global expressions instead of package names to define packages you want to exclude. For more information, see Specifying global expressions in yum input.

Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat