$ yum list installed|grep ruby|grep rhscl|awk '{print $1}'| xargs yum -y removeLike-wise for ruby under foreman and scl:
$ yum list installed|grep ruby|grep foreman|awk '{print $1}'| xargs yum -y remove $ yum list installed|grep ruby|grep scl|awk '{print $1}'| xargs yum -y remove