How to uninstall Jenkins?
MacosJenkinsContinuous IntegrationUninstallationMacos Problem Overview
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?
Macos Solutions
Solution 1 - Macos
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
Solution 2 - Macos
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.
Solution 3 - Macos
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 :)
Solution 4 - Macos
run this on Terminal:
sh "/Library/Application Support/Jenkins/Uninstall.command"
Solution 5 - Macos
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.
Solution 6 - Macos
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.
Solution 7 - Macos
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
Solution 8 - Macos
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