When a repository seems to be missing, the first question is whether it is disabled or whether your system uses a different DNF command than the one you tried.
DNF4 and DNF5 use different syntax for listing repositories. Both show enabled repositories by default; add --all to include disabled ones.
Use the command for your DNF version
For the traditional DNF4 command:
dnf repolist
dnf repolist --all
dnf repolist --disabled
For the DNF5 executable:
dnf5 repo list
dnf5 repo list --all
dnf5 repo list --disabled
The first command in each group lists enabled repositories. The --all form includes enabled and disabled entries, and --disabled filters the output to disabled repositories.
Which command is available depends on your distribution and release. Check what is installed before assuming a command is broken:
dnf --version
dnf5 --version
If dnf5 is not found, that alone does not indicate a repository problem. Use the syntax supported by the DNF version installed on your machine. For more context on the package-management tools and commands found on Fedora, see this overview of Fedora package management.
Read the repository list
The output normally includes a repository ID and a human-readable name. The ID is the useful part when you want to inspect a particular repository or run a repository-specific command. It may not match the friendly name exactly.
For example, if the list shows an ID such as REPO_ID, pass that ID to the appropriate repository-information command:
# DNF4
dnf repoinfo REPO_ID
# DNF5
dnf5 repo info REPO_ID
Replace REPO_ID with the identifier from your output. This displays information about that configured repository; it does not list all of its packages.
Repository list or package list?
These are easy to confuse because both involve repositories, but they answer different questions:
-
Which repositories are configured? Use
dnf repolistordnf5 repo list. - Which packages are available? Use package-listing commands.
-
What is configured for one repository? Use
dnf repoinfo REPO_IDordnf5 repo info REPO_ID.
The plain dnf list command belongs to the package-listing family. It is not the usual command for listing configured repositories. On DNF4, a repository-specific package query uses:
dnf repository-packages REPO_ID list
Package-query syntax can vary with the installed DNF version and commands, so check local help if that form is unavailable. The DNF update command guide covers updating packages, which is a separate task from listing repositories.
If a repository does not appear
Start by checking whether you ran the enabled-only command. A configured but disabled repository will not appear in the default listing. Try the all-repositories form for your DNF version:
dnf repolist --all
Or, with the DNF5 executable:
dnf5 repo list --all
If the repository is still missing, check whether it is configured for this machine and release, and whether DNF is using the configuration you expect. A repository that does not appear even with --all may not have a definition available to that DNF installation.
Listing repositories does not enable, install, or repair them. It only shows the repositories DNF can see, with the selected filter. Once you know whether an entry is present and enabled, you can investigate its configuration separately.
Quick reference
| Goal | DNF4 | DNF5 |
|---|---|---|
| List enabled repositories | dnf repolist |
dnf5 repo list |
| Include disabled repositories | dnf repolist --all |
dnf5 repo list --all |
| List disabled repositories | dnf repolist --disabled |
dnf5 repo list --disabled |
| Inspect one repository | dnf repoinfo REPO_ID |
dnf5 repo info REPO_ID |
The key distinction is simple: identify whether you have DNF4 or DNF5, then use its repository-listing syntax. If an expected entry is absent, check the full list before concluding that it is not configured.
I originally published a more detailed version of this guide on the SSHFlow blog.
I'm also building SSHFlow — an SSH client where every server gets its own workspace for terminals, SFTP, code, and databases.
Top comments (0)