Ask Your Question

repolist with priority

asked 2013-07-31 03:49:53 -0500

Samurai gravatar image

updated 2014-09-28 11:20:14 -0500

mether gravatar image


I've just installed yum-plugin-priorities and added priority to some of the repos. Is there any way I can see a list of repos (something like yum repolist) with their priorities?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-07-31 08:07:52 -0500

jamielinux gravatar image

updated 2013-07-31 08:11:41 -0500

It doesn't appear that the plugin provides that functionality. Perhaps you might consider opening a bug on our bugzilla and making a feature request. (I don't know if yum provides the hooks necessary for such a feature, but it's worth a shot.)

Fortunately, in the meantime the CentOS wiki has this one-line hack:

$ sed -n -e "/^\[/h; /priority *=/{ G; s/\n/ /; s/ity=/ity = /; p }" /etc/yum.repos.d/*.repo | sort -k3n

The output will look something like this:

priority = 97 [fedora]
priority = 98 [updates]

That's a bit cumbersome, so you can add an alias to your ~/.bashrc like this:

alias list-repo-priorities='sed -n blahblah ...'
edit flag offensive delete link more

Question Tools


Asked: 2013-07-31 03:49:53 -0500

Seen: 133 times

Last updated: Jul 31 '13