Uninstalling Puppet from Mac Os X
August 15, 2013 Leave a comment
Recent on the StackExchange site Super User, the following question came up which seemed pretty straight forward.
I naturally assumed that puppet labs would include an uninstaller with the .dmg package. It turns out, that is not the case. You must uninstall puppet manually.
I first identified where puppet was installed.
I assumed that there was also a puppet binary in the /usr/sbin directory which turned out to be correct
ls /usr/bin|grep puppet
Removing the puppet user was not as easy. I assumed it would be in /etc/shadow, however Mac does not use the shadow file. Nor does Mac have the userdel command.
I discovered the following blog post which elaborates on the dscl command.
You will need to reboot the machine for the puppet user to be deleted.
To be thorough, I ran the following command to look for any additional puppet files
sudo find / -iname 'puppet' -type d
Sure enough, there are two other folders to delete
To uninstall puppet, delete the following files
Remove the following directories
To get rid of the puppet user that appears on the login screen
sudo dscl . delete /Users/puppet
Reboot the machine and puppet will be uninstalled.
Note that facter will still be present. Uninstalling facter is not in the scope of this post.