Uninstall foreman

cbianchi picture cbianchi · Aug 30, 2013 · Viewed 13.4k times · Source

I have installed The Foreman on Ubuntu Server 12.04, following the instructions here:

http://theforeman.org/manuals/1.2/quickstart_guide.html#Installation

I have now decided that it is not for me - but I cannot find any instructions on how to uninstall. The various commands like gem uninstall foreman fail as it seems it was installed as gems.

Any help would be greatly appreciated. Thanks, Cristiano

Answer

Kyle picture Kyle · May 17, 2014

I'm sure you figured something else out by now but if anyone else is stuck on this, here are the commands that worked for me:

sudo apt-get --purge remove foreman foreman-installer foreman-proxy
sudo rm -rf /var/lib/foreman /usr/share/foreman /usr/share/foreman-proxy/logs
sudo rm /etc/apache2/conf.d/foreman.conf

You may also want to uninstall puppet if you were not using it prior to installing foreman:

sudo apt-get remove --purge puppet puppetmaster puppet-common puppetmaster-common puppetlabs-release
sudo rm -rf /usr/lib/ruby/vendor_ruby/puppet /usr/share/puppet /var/lib/puppet /etc/puppet
sudo rm /etc/apache2/conf.d/puppet.conf

You can also run the following to remove any other dependencies that were installed and are no longer required:

sudo apt-get autoremove

Finally, restart apache now that the foreman and puppet configs have been removed:

sudo service apache2 restart

I might be missing a few things but that seemed to get rid of most of it for me.