Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Uninstall Foreman RHEL
#!/bin/sh
service xinetd stop
service foreman-proxy stop
service httpd stop
killall -9 sidekiq
service puppet stop
service puppetserver stop
service postgresql stop
service rh-redis5-redis stop
yum remove -y *foreman*
yum remove -y puppet*
yum remove -y passenger
yum remove -y tfm*
yum remove -y httpd
yum remove -y rh-redis5*
yum remove -y rh-postgresql12*
yum remove -y xinetd
yum remove -y tftp-server
rm -f /etc/sysconfig/puppetserver
rm -f /etc/sysconfig/puppetserver.rpmsave
rm -f /root/.hammer/cli.modules.d/foreman.yml
rm -rf /etc/foreman*
rm -rf /etc/hammer/
rm -rf /etc/httpd
rm -rf /etc/opt/rh/rh-redis5
rm -rf /etc/puppet/
rm -rf /etc/puppetlabs
rm -rf /etc/systemd/system/rh-redis5-redis.service.d/
rm -rf /etc/xinetd.d/
rm -rf /opt/puppetlabs/
rm -rf /opt/rh/rh-redis5
rm -rf /opt/theforeman
rm -rf /tmp/*
rm -rf /usr/share/foreman*
rm -rf /usr/share/httpd
rm -rf /usr/share/puppet
rm -rf /var/lib/foreman*
rm -rf /var/lib/pgsql
rm -rf /var/log/foreman*
rm -rf /var/log/puppetlabs
rm -rf /var/log/redis
rm -rf /var/opt/rh/rh-postgresql12/ /opt/rh/rh-postgresql12 /etc/opt/rh/rh-postgresql12
rm -rf /var/opt/rh/rh-redis5
rm -rf /var/run/puppetlabs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment