How to uninstall Jenkins on mac completely - macos

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.

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.

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

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.

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

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,
Go to /Applications --> Delete the Jenkins folder
Delete /Users/Shared/Jenkins
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.

Try:
brew uninstall jenkins-lts
rm -r /Users/admin/.jenkins

Related

Homebrew install - sudo?

I am trying to install Homebrew in my terminal. It first asked me for Password which I typed in (the password I use to login to my computer) and hit enter. Then it comes up with 'Need sudo access on macOS!' - what does this mean? I am already the admin (as far as I know) as this is my personal laptop, noone else uses it.
I don't understand what else they need!
My aim is to install git but I can't even get this to install first..
Can anyone help, thanks :)
Open a new terminal session.
type sudo whoami
If it comes back with root then you have root privileges. You can also check under users and groups to see if you are an admin.
Also try running it again but using sudo first. You can also type sudo !! and that will run the previous command as sudo.
Run sudo visudo
Enter you password one last time
In the editor, search for %admin
The line probably looks like this:
%admin ALL = (ALL) ALL
Change it to this:
%admin ALL = (ALL) NOPASSWD: ALL
Save and Bob's your uncle.
If your macos account is in fact an Admin account, its password should be accepted by sudo.
See also this AskDifferent answer.
Simple solution
in the terminal type first
sudo su
Type the password
Install homebrew
So it's October 2022 and I came across the sudo messages AND I'm only running Catalina:
Go to this link: https://developer.apple.com/support/xcode/ to work out which version of Xcode is compatible with your macOS.
Sign in to your Apple Developer account and go to this page: https://developer.apple.com/download/all/. Keeping looking down the page till you come across your Xcode version but don't download Xcode just download "Command Line Tools for Xcode" with the same version number as as the compatible Xcode. These tools are a much smaller size than the Xcode file and this is really what Homebrew is looking for.
Run the downloaded installer for "Command Line Tools for Xcode".
Now run the script available on the Homebrew website: https://brew.sh, the current script is:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
This ran for me without any errors at all.
Cheers
To use a command as an admin, you need to use sudo before any command, even if you're already admin.

How to Start Dropbox After Installing It with Homebrew Cask?

I just started using Homebrew and Cask today to install Unix and OS X applications on my Mac but I don't understand something about Cask. When I run this command,
brew cask install dropbox
I can see that it installs it in /opt/homebrew-cask/Caskroom/dropbox/latest/Dropbox.app and I can see that it has created a symlink ~/Applications/Dropbox.app that points to it, but when I look in Finder at my Applications folder, I don't see it there as I would if I had installed Dropbox from a .dmg file. Also, I don't know how to start Dropbox from this symlink. How do I get Cask to install OS X apps so that I can start them from either the Application folder or via the command line in a terminal session?
just run open ~/Applications/Dropbox.app from your cmd line.
See http://gillesfabio.github.io/homebrew-cask-homepage/ for overview.
Hope that helps
The behavior has changed over the last few months. If you update homebrew to version 1.0 and then run brew cask install dropbox, the application will now be physically moved into /Applications/, and the symlink will be created in ~/Applications/.

Anaconda launcher won't open

I downloaded anaconda but when I click on the launcher application it doesn't open. I have tried to update it in terminal but it says command not found. How can I fix this?
In addition to fixing the path issues, as suggested by Thomas.
(Assuming you didn't press yes wen the installer asked if you wanted to prepend the Anaconda install location to your PATH)
It might just help to install the launcher:
>> conda install launcher
Anaconda Navigator stopped working after running TensorFlow script.
I reinstalled a new version of Anaconda. That did not fix the problem.
I followed a advice from:
https://github.com/ContinuumIO/anaconda-issues/issues/910
that did not fix the problem either.
Finally I tried this and it worked:
sudo rm -rf ~/.continuum/
Somehow ~/.continuum/ was owned by root.
In Windows, I used spyder directly from here:
C:\Program Files\Anaconda3\Scripts\spyder.exe
This is good to start coding.
Maybe the permission question, using the iterm run anaconda-navigator, you will get the error message.
If it's the permission question, just rename the permission file.
You should use this command:
python -m pip install jupyter notebook
then
just type:
jupyter notebook
it will work accurately.
I faced the same problem on my mac. Deleted the config.yaml file inside the binstar folder
/Users/<user_name>/Library/Application Support/binstar by using the command
rm -rf config.yaml
and it worked. I could open anaconda navigator.

sudo command not found on Cygwin

I am currently trying to install and update a few packages on a Windows OS. The only matter is that I am using Cygwin in order to type the commands through a terminal (as I'm aware, I can type in Linux type commands such as cd, ls etc. on Cygwin - I may be wrong). However, when I try to install a package like:
sudo apt-get install paparazzi-dev
I get the reply:
-sh: sudo: command not found.
Does anyone have an idea as to how I can fix this problem?
Run cygwin as administrator.. then you wouldn't need any sudo command.
Cygwin is not a full Linux distribution. Therefore you don't have sudo or the Debian/Ubuntu package manager apt-get. There is a number of packages available from the Cygwin repository: http://cygwin.com/packages/
You have to chose these packages during setup.
Windows does not have sudo, apt, or almost any Linux commands to be exact. Cygwin may allow some, but as programs are not installed on Windows as packages apt-get will not work. Windows programs have installers as .exe or .msi instead.
The Windows version of sudo is called runas in case you need to run something as another user. Or, you can run Cygwin as administrator.
If you have to use the packages you need Linux. You can install it directly to replace Windows, dual-boot or use a virtualization software like VMware VirtualBox.
Making out an explanatory answer from answer here by #Aimal as it worked for me.
Cygwin may not get permissions to create folders and files when run by clicking Cygwin icon that's in normal mode.
Cygwin gets the right authorization only when right click -> "run as adminitrator" on cygwin icon because of that it gets permissions to create folders and files.
Cygwin lets you run certain commands, such as cd, ls, or mv; but it doesn't let you run other commands, such as sudo or apt-get.
If you're trying to add a package to your Cygwin installation, rerun Cygwin Setup. It may still be in your "Downloads" folder. Go through all the steps again. The Cygwin installer will automatically download and install the package you want, and add it to your Cygwin installation. (I think it will probably also upgrade all your other installed Cygwin packages to the latest available versions.)
If your desired package isn't on the Cygwin package list but is on the Cygwin Ports package list, follow the Cygwin Ports installation instructions. Note that Cygwin Ports is separate from Cygwin. Please do not send messages about Cygwin Ports packages to the cygwin.com mailing lists.
If you have years of Linux experience, you may be able to compile the software you want inside Cygwin. This can be challenging.
Perhaps an option simpler than "compile it yourself" is this: You can install VirtualBox, then install your favorite Linux distribution inside the virtual machine, then install your desired package inside Linux. (I like Ubuntu Linux, which has more than 27,000 packages in its "Universe" repository.) Now you can run Linux and Windows at the same time.
I think I tried steps below after doing some research & succeeded (on windows)
1.Install scoop using powershell 3 (iex (new-object net.webclient).downloadstring('https://get.scoop.sh'))
2. do scoop install --global sudo
3. make sure paths (C:\Users\\scoop\shims & C:\ProgramData\scoop\shims) added in environmental path variable.
In my case, I wanted to install curl, but could not create directory /usr/local/curl/lib when running command "make install", because of permission deny. so i need to change /usr/local permission. when i run sudo chmod 755 /usr/local, sudo command not found.
after searching a few solution, found that sudo is not installed by default in Cygwin. But I tried the solution that Aimal gave which is to run Cygwin as administrator. I finally can change the folder permission. Thanks Aimal.

Installing Git separately from Github for Mac

I've installed Github for Mac.
I've realised that I need to get to the command line to do some stuff.
There is an option in Guthub for Mac to install a command line. All this seems to do is create an alias called Github in /usr/local/bin that points back to the Github for Mac application.
Double clicking it opens a terminal window and then Github for Mac.
Any ideas how to get Git to work in a command line?
Its a relatively clean version of Lion OS X
Git is included in the command line tools package provided by Apple that can be downloaded at https://developer.apple.com/downloads/index.action
It is also included with Xcode, which can be downloaded from either the Mac App Store or from the above link.
Assuming you'd rather not install either of these you can also obtain Git by downloading it from http://git-scm.com/downloads
Hope that helps.
https://help.github.com/articles/set-up-git#platform-mac
Should walk you though installing it.
I highly recommend installing Homebrew, which does a great job of keeping up with the latest git releases.
Once Homebrew is installed, it's as simple as:
brew install git
Note that, from May 2013, you now have with "GitHub for Mac" both:
the GUI
the CLI (Command-Line Interface)
See the blog post "Installing Git from GitHub for Mac"
you can now easily install Git for use on the command line, without needing to download any separate packages.
Even the git updates are taken care for you:
And whenever we update the version of Git included with GitHub for Mac, you'll get the changes automatically – no work required on your part!
you may notice some changes to the Preferences window.
On the newly renamed "Advanced" tab, simply click "Install Command Line Tools".
You'll be prompted for an administrator password so that Git can be installed into /usr/local/bin, and then you should very shortly see that it succeeded:
GitHub app create many links in /usr/local.
Use this command to find all link files from GitHub.
ls -l $(find /usr/local -type l) | grep GitHub.app | awk '{ print $9}'
then rm them.
PS: GitHub also created some directories that cause error when run brew link git,
e.g. /usr/local/share/git-core, /usr/local/lib/perl5/site_perl.
You should remove them carefully.

Resources