This is probably very simple, but I can't find any hint anywhere. So how one is supposed to do that, in general and specifically on Mac?
8 Answers
These instructions apply if you installed using the official Jenkins Mac installer from http://jenkins-ci.org/
Execute uninstall script from terminal:
'/Library/Application Support/Jenkins/Uninstall.command'
or use Finder to navigate into that folder and double-click on Uninstall.command.
Finally delete last configuration bits which might have been forgotten:
sudo rm -rf /var/root/.jenkins ~/.jenkins
If the uninstallation script cannot be found (older Jenkins version), use following commands:
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
sudo rm /Library/LaunchDaemons/org.jenkins-ci.plist
sudo rm -rf /Applications/Jenkins "/Library/Application Support/Jenkins" /Library/Documentation/Jenkins
and if you want to get rid of all the jobs and builds:
sudo rm -rf /Users/Shared/Jenkins
and to delete the jenkins user and group (if you chose to use them):
sudo dscl . -delete /Users/jenkins
sudo dscl . -delete /Groups/jenkins
These commands are also invoked by the uninstall script in newer Jenkins versions, and should be executed too:
sudo rm -f /etc/newsyslog.d/jenkins.conf
pkgutil --pkgs | grep 'org\.jenkins-ci\.' | xargs -n 1 sudo pkgutil --forget
-
I think it can be included into installer as an option, in customize section. Or I believe there should be some delete hooks, when user decides to drop application into trash bin. But what's that "sudo rm !$" for?– jayarjoJul 24, 2012 at 6:52
-
-
1I have never seen Mac applications uninstalled using a customized installation or by setting up a folder action for Trash. Can you point me to some examples of those?– stiJul 24, 2012 at 20:31
-
41The above commands will be found in
/Library/Application Support/Jenkins/Uninstall.command
hopefully in a couple of weeks.– stiJul 24, 2012 at 22:44 -
1Since it looks like the Uninstall.command script is there now, it'd be good to update the first part of the answer with that (though having the info for folks with older installations is still very handy). Jan 21, 2013 at 16:25
You are right, it is simple. Run (admin password required):
'/Library/Application Support/Jenkins/Uninstall.command'
It may be necessary to do this with admin privileges using sudo.
-
This helped a ton. I'm shocked that this information isn't more prevalent anywhere in Mac's documentation.– MakotoFeb 28, 2013 at 4:23
-
3I thought StackOverflow is the ipso facto default documentation for everything :) I've found more (case specific and most of the times better explained) answers here than most application documents :)– javatarzJun 25, 2013 at 8:10
-
1Thanks! Would be awesome if the OP could change the accepted answer for this one.– xmarcosSep 4, 2013 at 2:48
Keep in mind, that in Terminal you need to add backslash before space, so the proper copy/paste will be
/Library/Application\ Support/Jenkins/Uninstall.command
p.s. sorry for the late answer :)
-
I think this should be a comment (to which answer?). Thw two highest answers have quotes around the command to protect the space from interpretation of the shell.– BrandinJul 16, 2015 at 12:15
run this on Terminal:
sh "/Library/Application Support/Jenkins/Uninstall.command"
-
4As of May 2017 there isn't even a Jenkins folder in Application Support– brainrayMay 29, 2017 at 7:19
There is no uninstaller. Therefore, you need to:
Delete the directory containing Jenkins (or, if you're deploying the war -- remove the war from your container).
Remove ~/.jenkins.
Remove you startup scripts.
-
Well, I was referring to scripts like the rc init scripts. If you haven't set up any, then just removing jenkins is enough. Jul 23, 2012 at 11:34
-
I've installed it through Mac OS X installer, so not sure what did it create :|– jayarjoJul 23, 2012 at 11:53
-
I recommend, you just delete the folders then. Let me know, if have any problems. Jul 23, 2012 at 12:47
My Jenkins version: 1.5.39
Execute steps:
Step 1. Go to folder /Library/Application Support/Jenkins
Step 2. Run Uninstall.command jenkins-runner.sh
file.
Step 3. Check result.
It work for me.
-
1There is no Jenkins version '1.5.39'. And this is only a incomplete copy of previous answers.– t0r0XMar 22, 2015 at 14:31
Run the following commands to completely uninstall Jenkins from MacOS Sierra. You don't need to change anything, just run these commands.
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
sudo rm /Library/LaunchDaemons/org.jenkins-ci.plist
sudo rm -rf /Applications/Jenkins '/Library/Application Support/Jenkins' /Library/Documentation/Jenkins
sudo rm -rf /Users/Shared/Jenkins
sudo rm -rf /var/log/jenkins
sudo rm -f /etc/newsyslog.d/jenkins.conf
sudo dscl . -delete /Users/jenkins
sudo dscl . -delete /Groups/jenkins
pkgutil --pkgs
grep 'org\.jenkins-ci\.'
xargs -n 1 sudo pkgutil --forget
Salam
Shah
On Mac; these two below commands completely remove Jenkins from your machine. just open your Terminal and execute them:
- '/Library/Application Support/Jenkins/Uninstall.command' and
- sudo rm -rf /var/root/.jenkins ~/.jenkins
Thanks