2.3. Enabling and disabling DNF plugins


In the DNF tool, plugins are loaded by default. However, you can influence which plugins DNF loads.

Every installed plugin can have its own configuration file in the /etc/dnf/plugins/ directory. Name plugin configuration files in the <plugin_name>.conf directory. By default, plugins are typically enabled. You can manage plugins by either using different dnf commands or modifying the [main] section of the plugin’s configuration file.

警告

Disable all plugins only for diagnosing a potential problem. DNF requires certain plugins, 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 DNF uses plugins:

    • To enable or disable loading of DNF plugins 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 DNF plugins.
      • Set plugins=0 to disable loading of all DNF plugins.
    • To disable a particular plugin, add enabled=False to the [main] section in the /etc/dnf/plugins/<plug-in_name>.conf file:

      [main]
      enabled=False
    • To disable all DNF plugins for a particular command, append the --noplugins option to the command. For example, to disable DNF plugins for a single update command, enter:

      # dnf --noplugins update
    • To disable certain DNF plugins for a single command, append the --disableplugin=<plugin-name> option to the command. For example, to disable a certain DNF plugin for a single update command, enter:

      # dnf update --disableplugin=<plugin_name>
    • To enable certain DNF plugins for a single command, append the --enableplugin=<plugin-name> option to the command. For example, to enable a certain DNF plugin for a single update command, enter:

      # dnf update --enableplugin=<plugin_name>
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部