I have installed leiningen using this script. How can I uninstall it?
I tried this SO solution but it says self-install is deprecated.
I have installed leiningen using this script. How can I uninstall it?
I tried this SO solution but it says self-install is deprecated.
The script has some helpful comments at the start:
# Ensure this file is executable via `chmod a+x lein`, then place it # somewhere on your $PATH, like ~/bin. The rest of Leiningen will be # installed upon first run into the ~/.lein/self-installs directory.
So to uninstall it, in theory you only need remove that directory
rm -r ~/.lein
assuming you did not run the script as root.
If you might want to reinstall the program in the future, you can keep the script; since it's in a path location, typing lein would cause the script to be run again, reinstalling the software. If you don't want this to happen, delete the script itself (rm ~/bin/lein assuming that is the path to it) or remove execute permission from it (chmod -x ~/bin/lein).
If you are trying to remove Lein to change the version that you are using because you are running into an issue similar to the one described here on GitHub then remove Lein as mentioned by Zanna:
rm -r ~/.lein
Update the version of Lein to the one you need in the lein script (the one you downloaded from the lein site possibly under ~/bin/lein):
export LEIN_VERSION="2.8.2"
Change this to the version you want (in my case changing this to 2.8.1 resolved the issue).
Install Lein again by running:
lein
Confirm all is in order by trying to run the repl:
lein repl
If you get something similar to the following you have successfully installed Lein:
nREPL server started on port 50634 on host 127.0.0.1 - nrepl://127.0.0.1:50634
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.8.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_121-b13
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
user=>
1) Find where did you place this executable and delete it:
$ which lein # returns /path/to/lein
$ sudo rm /path/to/lein
2) Remove lein cache/config folder
$ rm -Rf ~/.lein