How to uninstall Jenkins?

◇◆丶佛笑我妖孽 提交于 2019-12-29 10:03:30

问题


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?


回答1:


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



回答2:


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.




回答3:


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 :)




回答4:


run this on Terminal:

sh "/Library/Application Support/Jenkins/Uninstall.command"



回答5:


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.




回答6:


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.




回答7:


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



来源:https://stackoverflow.com/questions/11608996/how-to-uninstall-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!