The following worked for me: rpm -qa --qf '%{name}\n' | grep XFree86 | sed 's/XFree86/xorg-x11/' | xargs yum -y install