9

I installed puppet 3.x on Mac OS 10.8.4 a few weeks back, and now want to remove it.
The installer.dmg does not come with an uninstaller, and there is no .app package to remove.

How do you uninstall puppet from Mac OS X ?

spuder
  • 9,854
  • 4
  • 42
  • 57
Daniel Groves
  • 503
  • 1
  • 5
  • 12

2 Answers2

12

Puppet does not have an uninstaller, you must manually remove the following files. (Tested on 3.2.3)

Uninstalling

Remove the following binaries

/usr/bin/puppet
/usr/sbin/puppet

Remove the following directories

/private/etc/puppet
/usr/share/doc/puppet

To get rid of the puppet user that appears on the login screen

sudo dscl . delete /Users/puppet

You will need to reboot for the user to disappear


resources
spuders blog - how to remove puppet from Mac
delete puppet installed via ruby
remove hidden user from mac

spuder
  • 9,854
  • 4
  • 42
  • 57
10

The above answer is incomplete, not all the files are removed with the above commands.

I was able to completely uninstall Puppet (on Mountain Lion) by running the following commands:

for f in $(pkgutil --only-files --files com.puppetlabs.puppet); do sudo rm /$f; done
for d in $(pkgutil --only-dirs --files com.puppetlabs.puppet | tail -r); do sudo rmdir /$d; done
sudo pkgutil --forget com.puppetlabs.puppet
Emyl
  • 495
  • 4
  • 9
  • Puppetlabs did a great job having the files actually delivered by the payload, this is a very smart and native way to go about removing it. Greatly appreciated. – Sacrilicious Apr 08 '15 at 13:39
  • With version 4.6.1 of the puppet agent you have to change com.puppetlabs.puppet to `com.puppetlabs.puppet-agent`. `for f in $(pkgutil --only-files --files com.puppetlabs.puppet-agent); do sudo rm /$f; done for d in $(pkgutil --only-dirs --files com.puppetlabs.puppet-agent | tail -r); do sudo rmdir /$d; done sudo pkgutil --forget com.puppetlabs.puppet-agent` After running this I still had files under /opt/puppetlabs so it doesn't seem to fully work currently. – Chris Magnuson Aug 25 '16 at 20:20
  • The above solution worked for me when I had to uninstall Puppet 3 on El Capitan as well. (Haven't tried with Puppet 4.) – chriskilding Sep 14 '16 at 18:10