Fix DNF Config-Manager Command Not Found: DNF4 & DNF5

If dnf config-manager is not found, check which DNF version you are running, then install its matching plugin package: dnf-plugins-core for DNF4 or dnf5-plugins for DNF5. If the error names --add-repo instead, the plugin may already work—you probably need DNF5 syntax.

I would start with the exact error and version, before changing repositories. A missing command, an unsupported option, and an unavailable package are different failures. This guide covers conventional DNF-based systems; use your image-based distribution’s own instructions for changes to an immutable host.

01Identify the command that actually failed

The search phrase “dnf config manager command not found” often hides a small but important spelling issue. The subcommand is config-manager, with a normal hyphen. It is not two arguments, config manager, and it is not normally a standalone shell executable.

Run these read-only checks in the same terminal or container where the failure occurred:

Terminal
cat /etc/os-release
command -v dnf
dnf --version
dnf config-manager --help

The release information identifies the operating system. The executable lookup checks whether the shell can find DNF, while the version output distinguishes the implementation. If the last command displays help specifically for config-manager, you already have a usable command; skip plugin installation and examine the rejected option.

Match the error to the next check
Error namesWhat to investigate
dnf: command not foundDNF installation, PATH, or the wrong operating environment.
config-manager as an unknown command or argumentMissing or unloaded matching plugin.
--add-repo as an unknown argumentDNF4 instructions being used with DNF5.
No match for the plugin packageRepository availability or the wrong package choice.

Exact wording varies by release. Do not treat a successful dnf --version as proof that every optional command is installed, and do not assume a distribution name alone tells you which executable your shell invoked.

02Install the plugin for your DNF version

Choose one branch based on the version check. Installing both packages as a guessing strategy makes the result harder to interpret, particularly on a machine where multiple DNF implementations coexist.

DNF4

Install the core plugin collection, then ask the command for help:

DNF4
sudo dnf install dnf-plugins-core
dnf config-manager --help

DNF5

If your dnf command reports DNF5, install its plugin collection:

DNF5
sudo dnf install dnf5-plugins
dnf config-manager --help

Read the proposed package transaction before confirming it. These examples intentionally leave the confirmation prompt enabled. A successful installation should be followed by config-manager help, not another unrecognized-command message.

If you deliberately use the separate dnf5 executable, use that name consistently for installation and verification:

Explicit DNF5 executable
sudo dnf5 install dnf5-plugins
dnf5 config-manager --help

On DNF4, a command-provider request is another supported way to ask the package manager for the relevant plugin:

DNF4 alternative
sudo dnf install 'dnf-command(config-manager)'

The quotes protect the parentheses from shell interpretation. This is an alternative to the DNF4 package installation, not a second required step. I would use the explicit package names above when explaining the fix to someone else: they make the version choice visible.

03Translate old repository instructions for DNF5

When config-manager help works but your original command fails, compare the arguments. DNF5 changed several config-manager operations from options into subcommands. Reinstalling the plugin cannot make an obsolete option valid.

The old shape

DNF4 uses config-manager --add-repo followed by the repository location.

The DNF5 shape

For a supplied repository file, DNF5 uses config-manager addrepo --from-repofile= followed by its location.

For example, the independent overview of Mullvad Browser installation shows separate Fedora command forms. It is a useful reminder to identify the package-manager version before copying a software-installation recipe. Check the software vendor’s current instructions for the repository and signing-key details you actually need.

The following are command templates, not repository recommendations. Replace REPO_FILE_URL with the vendor’s verified HTTPS .repo file URL before running either command. Choose the block for your version.

DNF4 template — replace REPO_FILE_URL
sudo dnf config-manager --add-repo REPO_FILE_URL
DNF5 template — replace REPO_FILE_URL
sudo dnf config-manager addrepo --from-repofile=REPO_FILE_URL

A repository file and a repository’s package directory are different inputs. Do not mechanically attach --from-repofile to every old URL: confirm that the address supplies a repository configuration file. Adding a repository also does not complete every vendor’s installation or key-verification procedure.

For enabling an existing repository, DNF4 supports --set-enabled. DNF5 supports the setopt approach shown below. Replace REPO_ID with the exact repository identifier, not its descriptive display name.

DNF4 template — replace REPO_ID
sudo dnf config-manager --set-enabled REPO_ID
DNF5 template — replace REPO_ID
sudo dnf config-manager setopt REPO_ID.enabled=1

DNF5 stores repository overrides separately rather than rewriting the original repository definition. If the original file appears unchanged, inspect the effective configuration before concluding that the command failed. Record the previous setting before changing it so you can restore the intended state.

04If the correct package is already installed

An installed package and an available command are not identical checks. My next step would be to establish whether you are testing the same executable and environment that received the installation.

Read-only checks
type -a dnf
rpm -q dnf-plugins-core dnf5-plugins

The package query may report that one collection is absent; that is expected if you only use the other implementation. In Bash, type -a can expose aliases, functions and multiple executable locations. Inspect any wrapper rather than assuming it behaves like the distribution-provided command.

Check DNF4 plugin settings

DNF4 can disable plugins globally through plugins=False in its configuration. It also supports command-line plugin-disabling options, and plugin configuration files normally live under /etc/dnf/plugins. Review deliberate local changes and any flags added by a script.

I would not overwrite the whole configuration with a downloaded “working” file. Preserve a backup and correct only a setting you have identified as responsible. If an administrator intentionally disabled plugins, establish the reason before changing that policy.

Check the DNF5 application-plugin environment

DNF5 has an application-plugin directory override named DNF5_PLUGINS_DIR. Setting it to an empty string disables loading those application plugins. An unusual shell or automation environment can therefore matter even when the package is installed.

Environment check
printenv DNF5_PLUGINS_DIR

If it prints nothing, distinguish an unset variable from one explicitly set empty using your shell’s environment inspection. Do not confuse DNF5 library-plugin controls with the application plugins that supply commands. Use the documentation for the component named in the error.

If this happens in a container, diagnose it inside that container. Installing a plugin on the host does not demonstrate that the container contains it. The same reasoning applies to a build stage or a remote shell: the failing process is the environment that matters.

05When the plugin package cannot be downloaded

A failed plugin installation has not repaired the missing command. Keep the installation error: a missing package match, unreachable mirror, certificate failure and dependency conflict point to different next steps.

No matching package

Recheck the DNF generation and distribution release. Inspect enabled repositories before assuming the package was removed.

Download or metadata failure

Resolve the named repository, network or certificate problem, then repeat the matching installation. Changing command syntax will not fix a failed download.

Use the repository-list command appropriate to your implementation:

DNF4
dnf repolist
DNF5
dnf5 repo list

For a RHEL system with repositories managed by subscription-manager, use that management tool for those repositories. The DNF4 config-manager documentation specifically warns about enabling or disabling repositories generated by subscription-manager.

I would avoid adding an unrelated distribution’s repository simply to obtain this plugin. That introduces a new variable before the original problem is understood. Equally, clearing every cache is not a universal fix: removing metadata cannot install a missing plugin, and it may force additional downloads.

If the system’s normal repositories are unavailable, the next useful evidence is the complete installation error and enabled repository list. A random RPM from a different release is not a reliable substitute for resolving that mismatch.

06Verify the repair before resuming installation

First check command availability, then return to the repository operation you originally intended. Keep those checks separate so a later network or signing-key failure does not look like the plugin repair failed.

  1. Command loads: config-manager help displays the available operations.
  2. Syntax matches: the original task uses options or subcommands supported by that version.
  3. Repository state matches: the intended repository appears with the expected enabled state.
  4. Installation resumes: follow the vendor’s remaining steps and assess any new error on its own terms.

A plugin help check normally does not require a reboot. If it still fails, collect the operating-system release, DNF version, exact command, plugin package-query output and full error for a focused support request. Remove credentials or private repository tokens before sharing output.

07Questions that come up during this repair

Should I use sudo for the help check?

Ordinary command help should not require administrative privileges. Use sudo for the package installation and persistent system configuration changes. If behavior differs with sudo, investigate the executable and environment used in each case.

Can I use this on Ubuntu?

Do not adopt a Fedora repository recipe merely because DNF can be installed on another distribution. Use the application vendor’s instructions for your operating system. If the task deliberately targets an RPM-based container, perform these checks there.

Does a missing config-manager mean DNF is broken?

No. An optional command can be unavailable while ordinary package operations remain usable. The useful distinction is whether DNF starts at all and whether the failure occurs before or after the requested subcommand is recognized.