Thursday 30 November 2017

Listing repositories in CentOS Linux

In CentOS and Red Hat flavors of Linux, if we want to list all the configured repositories, we need to use the following command.

yum repolist

This will list information with columns like repo id, repo name, status.

Use the verbose mode with the -v switch for more detailed information.

yum -v repolist

For listing only enabled and/or disabled repositories, use the following syntax

yum repolist enabled

OR

yum repolist disabled

For listing all of the repositories (i.e enabled and disabled), use :

yum repolist all

Now, from the list of of all configured repositories, if we want to disable/enable a specific repository, use the following :

yum-config-manager --disable test-repo-name.repo

OR

yum-config-manager --enable test-repo-name.repo

Hope it helps guys. Ciao!

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...
eXTReMe Tracker