macos 如何卸载詹金斯?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11608996/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 09:21:56  来源:igfitidea点击:

How to uninstall Jenkins?

macosjenkinscontinuous-integrationuninstall

提问by jayarjo

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?

这可能很简单,但我在任何地方都找不到任何提示。那么,一般来说,特别是在 Mac 上,应该如何做到这一点?

回答by sti

These instructions apply if you installed using the official Jenkins Mac installer from http://jenkins-ci.org/

如果您使用来自http://jenkins-ci.org/的官方 Jenkins Mac 安装程序进行安装,则这些说明适用

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.

或使用 Finder 导航到该文件夹​​并双击 Uninstall.command。

Finally delete last configuration bits which mighthave been forgotten:

最后删除可能已经忘记的最后配置位:

sudo rm -rf /var/root/.jenkins ~/.jenkins

If the uninstallation script cannot be found (older Jenkins version), use following commands:

如果找不到卸载脚本(较旧的 Jenkins 版本),请使用以下命令:

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

并删除 jenkins 用户和组(如果您选择使用它们):

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:

这些命令也由较新的 Jenkins 版本中的卸载脚本调用,也应该执行:

sudo rm -f /etc/newsyslog.d/jenkins.conf
pkgutil --pkgs | grep 'org\.jenkins-ci\.' | xargs -n 1 sudo pkgutil --forget

回答by alexchernyy

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.

可能需要使用 sudo 以管理员权限执行此操作。

回答by Lucifer

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

/Library/Application\ Support/Jenkins/Uninstall.command

p.s. sorry for the late answer :)

ps 抱歉回复晚了 :)

回答by Alécio Carvalho

run this on Terminal:

在终端上运行:

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

回答by carlspring

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.

  • 删除包含 Jenkins 的目录(或者,如果您正在部署War——从容器中删除War)。

  • 删除 ~/.jenkins。

  • 删除您的启动脚本。

回答by PhungLe

My Jenkins version: 1.5.39

我的詹金斯版本:1.5.39

Execute steps:

执行步骤:

Step 1. Go to folder /Library/Application Support/Jenkins

步骤 1. 转到文件夹 /Library/Application Support/Jenkins

Step 2. Run Uninstall.command jenkins-runner.shfile.

步骤 2. 运行 Uninstall.commandjenkins-runner.sh文件。

Step 3. Check result.

步骤 3. 检查结果。

It work for me.

它对我有用。

回答by HA S

Run the following commands to completely uninstall Jenkins from MacOS Sierra. You don't need to change anything, just run these commands.

运行以下命令从 MacOS Sierra 中完全卸载 Jenkins。您无需更改任何内容,只需运行这些命令即可。

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

沙阿