first, you should get the list about the packages binding with foreman-installer. Run the following command to get the list:
sudo dpkg -l |grep foreman
in my environment(ubuntu 12.04 and foreman 1.4), it returned with info including 'foreman', 'foreman-installer', 'foreman-postgresql', 'foreman-proxy' and 'ruby-foreman-api'.
then we can use apt-get
to remove the above packages out:
sudo apt-get remove --purge foreman
sudo apt-get remove --purge foreman-proxy
sudo apt-get remove --purge ruby-foreman-api
it should removed all foreman related packages after the above commands. You can run dpkg -l |grep foreman
to ensure all foreman related packages had been removed.
finally, you can remove other no longer required packages by sudo apt-get autoremove
.
some logs and conf folders from foreman will be still remain in your OS, you may have to clean them manually.