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...
2 comments on “SYS: Manage repositories.
  1. scruff says:

    Hi there,
    During the exam, am I allowed to delete the old content of folder rm -rf /etc/yum.repos/* and put a new repofile, lets say myrepository.repo and put repository link into it?

Leave a Reply

RHCSA7: Task of the day

Allowed time: 10 minutes.
Boot and change the root password before the end of the boot process.

RHCE7: Task of the day

Allowed time: 10 minutes.
Set up a default secure MariaDB database called maria and back up the database with mysqldump.

Follow me on Twitter

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

Archives