#yum erase 'centos*'

Make sure to edit the /etc/yum.conf to remove the packages listed in the exclude section

[main]
exclude= ..