remove_packages() first param is the chroot dir
ensure yum is not interactive
avoid the use of global variable with no reason