To list the contents of an RPM package, that is not installed,
use the following command:
$ sudo repoquery -l <package-name>
Note: The repo that the package resides in MUST be enabled!!!
Hello DE12,
To display all of the enabled repos, execute the following command:
$ sudo yum repolist --enabled
Any repo that is not in the output, ain't enabled!!!
@Trevor I have found repoquery to be especially useful when you have multiple repos configured and enabled in your system and you want to know from which yum repository a package had been installed.
How do know if repo is enabled
Hello DE12,
To display all of the enabled repos, execute the following command:
$ sudo yum repolist --enabled
Any repo that is not in the output, ain't enabled!!!
The command you've provided:
sudo yum repolist --enabled
is indeed the correct command to display all of the enabled repositories when using the yum package manager, which is commonly found on Red Hat-based distributions like CentOS and Fedora (up to version 22, before it was replaced by DNF in Fedora 23).
Here are some other ways to check for enabled repositories:
dnf repolist --enabled
You can manually inspect the .repo files located in /etc/yum.repos.d/:
grep -E "^\[.*\]" /etc/yum.repos.d/*.repo
This will list all repositories, and you'd need to check for enabled=1 within each block to see if they're enabled.
Query with repoquery:
If yum-utils is installed, you can use repoquery to list enabled repositories:
repoquery -a --repoid=*
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.