cancel
Showing results for 
Search instead for 
Did you mean: 
Trevor
Starfighter Starfighter
Starfighter
  • 1,044 Views

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!!!
           

 

Trevor "Red Hat Evangelist" Chandler
1 Solution

Accepted Solutions
Trevor
Starfighter Starfighter
Starfighter
  • 893 Views

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 "Red Hat Evangelist" Chandler

View solution in original post

4 Replies
Chetan_Tiwary_
Community Manager
Community Manager
  • 979 Views

@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.

 

DE12
Cadet
Cadet
  • 903 Views

How do know if repo is enabled

Dwayne Ewens
0 Kudos
Trevor
Starfighter Starfighter
Starfighter
  • 894 Views

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 "Red Hat Evangelist" Chandler
shashi01
Moderator
Moderator
  • 883 Views

@Trevor  @DE12 

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=*

0 Kudos
Join the discussion
You must log in to join this conversation.