17

I installed Jenkins with brew on mac. But it occurs some problem, I want to re-install it. Previously, at the first time I access http://localhost:8080, the page guides you to install some plugins and need you to input the password. But when I use 'brew uninstall jenkins' command and install again, the page will not show. I don't remember the previous default admin passsword. So I can't access the jenkins now. I delete the homebrew cache as well, it not worked. Is there any solutions to uninstall Jenkins completely? I just want to start from the beginning of the installation. Thanks.

2
  • Try adding --force when removing. May 16, 2017 at 15:47
  • 1
    Thanks,I tried, but it didn't work
    – nasuf
    May 16, 2017 at 15:50

6 Answers 6

51

In terminal, write and execute

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

Note If you installed it with sudo, then use this:

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

Then follow the instructions.

3
  • I installed the latest Jenkins version 2.80. And i can't find the uninstall.command file.
    – touti
    Sep 27, 2017 at 14:05
  • 1
    Worked on Jenkins 2.82, but I installed it via a.pkg file Oct 6, 2017 at 14:38
  • 1
    can add that it worked like a charm with 2.73.1 LTS. had to navigate to the folder manually though. plus you need sudo (admin) password
    – Markus
    Oct 7, 2017 at 12:28
17

Remove the hidden .jenkins directory in your home directory that contains the configuration.

3
  • 4
    You should explain your answer Mar 9, 2018 at 4:15
  • I think the $HOME/.jenkins directory typically only applies to Homebrew users, like @jaju mentioned in their pseudo-comment/answer here. But this is indeed where Jenkins content lives for brew users, not in /Library/Application Support/Jenkins or anywhere like that. Jan 24, 2019 at 22:34
  • FYI, I did not install via Brew and had a .jenkins folder. Thanks for this tip from me.
    – joedragons
    Nov 12, 2021 at 0:01
6

Removing the .jenkins file is actually an answer, depending how Jenkins was installed. For example, the homebrew installation does create instance-specific work area in $HOME/.jenkins

If you have the jenkins instance already running, go to $JENKINS_BASE_URL/configure and check the value of 'Home directory' - that is the place where all user-specific data is stored, like the jobs.

PS: BTW - can't get away from SO stupidity. This is a comment to the answer by Ayobi, but don't have reputation to comment.

3

To uninstall Jenkins service from your Mac OS X computer, execute uninstall script from terminal:

sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
/Library/Application Support/Jenkins/Uninstall.command

https://wiki.jenkins.io/display/JENKINS/Thanks+for+using+OSX+Installer

3

I installed Jenkins as pkg from jenkins.io. There was some issue and I wanted to delete it. I couldn't find Jenkins folder or Uninstall Command in Library, so this is what I did,

  1. Go to /Applications --> Delete the Jenkins folder
  2. Delete /Users/Shared/Jenkins
  3. Delete Jenkins (there will be a standard user with no name username for the first time when jenkins is installed) from "Users & Groups"

After this I re-installed Jenkins and it seem to work.

2
  • 1
    I'm not able to select that unnamed standard user. How do i delete it? May 23, 2018 at 5:18
  • 1
    @Krutika Sonawala I know its silly to ask but did you unlock the User's & Group settings, so that it is editable? I was able to delete without any issue
    – anoop4real
    May 23, 2018 at 5:38
2

Try:

  1. brew uninstall jenkins-lts
  2. rm -r /Users/admin/.jenkins

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.