SYS: Manage repositories.

Share this link

It is perfectly possible to point at several software repositories at the same time.
To better deal with this situation, you need to use the yum repolist and yum-config-manager commands.

To get the list of all the available repositories (enabled and disabled), type:

# yum repolist all
...
repo id                       repo name                           status
base/7/x86_64                 n40l - Base                         enabled: 8,465
epel/x86_64                   Extra Packages for Enterprise Linux disabled
repolist: 8,465

Note: The -v option displays even more details.

To get the list of the enabled repositories, type:

# yum repolist
...
repo id                repo name                                          status
base/7/x86_64          n40l - Base                                        8,465
repolist: 8,465

To get the list of the disabled repositories, type:

# yum repolist disabled
...
repo id                       repo name
epel/x86_64                   Extra Packages for Enterprise Linux 7 - x86_64
repolist: 0

To permanently enable a repository (here epel), type:

# yum-config-manager --enable epel

To permanently disable a repository (here epel), type:

# yum-config-manager --disable epel

To temporary enable a repository (here epel) in order to install a specific package (here Pound), type:

# yum --enablerepo=epel install Pound

Note: Use the –disablerepo option to temporary disable a repository.

Source: Inspired from an ITSprite tutorial about the yum repolist command.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Leave a Reply

Be the First to Comment!

Notify of
wpDiscuz

RHCSA7: Task of the day

Allowed time: 5 minutes.
Create a new user account called "bob" with password "redhat" and set expiration in one week.

RHCE7: Task of the day

Allowed time: 8 minutes.
Set up an iScsi target based on a block backstore of 100MB called lv_iscsi with basic authentication, ext4 filesystem and standard firewall configuration.

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...

Recent Comments