May28

Checking a machines yum exclude policy

Posted by Karanbir Singh on 28/May/2009  ~  Posted in: Linux

Want a quick and easy way to check what the Excludes policy on a machine is ? Run this :

wget -q http://centos.karan.org/check_excludes.py -O - | python

It should give you some nice clean output, listing each repository enabled on the machine, along with the exclude setup for that repo. Something like this :

main: []
centos-base - ['perl', 'rsync']
centos-updates - ['perl', 'rsync']

Remember that the "main:" section in yum is the global system/repowide configs - anything listed there would be excluded from all repositories.

I needed it, but its Seth who wrote this snippet of code.