yum equivalent of "apt-get purge"

Solution 1:

Do

yum remove package
yum install package

on command line. If there is any config file which is not replaced during installation then message will be printed on screen that the file has been saved with different name. Move new file to old file.

This is hoping there are very less configuration files of package which you are trying to re-install.

Solution 2:

Not terribly elegant, but it works:

for package in package1 package2 package3
do
  echo "removing config files for $package"
  for file in $(rpm -q --configfiles $package)
  do
    echo "  removing $file"
    rm -f $file
  done
  rpm -e $package
done