New way
Use the uninstall command: rbenv uninstall [-f|--force] <version>
rbenv uninstall 2.1.0 # Uninstall Ruby 2.1.0
Use rbenv versions to see which versions you have installed.
Old way
To remove a Ruby version from rbenv, delete the corresponding directory in ~/.rbenv/versions. E.g.
rm -rf ~/.rbenv/versions/1.9.3-p0
Run rbenv rehash afterwards to clean up any stale shimmed binaries from the removed version.
New way
Use the uninstall command: rbenv uninstall [-f|--force] <version>
rbenv uninstall 2.1.0 # Uninstall Ruby 2.1.0
Use rbenv versions to see which versions you have installed.
Old way
To remove a Ruby version from rbenv, delete the corresponding directory in ~/.rbenv/versions. E.g.
rm -rf ~/.rbenv/versions/1.9.3-p0
Run rbenv rehash afterwards to clean up any stale shimmed binaries from the removed version.
ruby-build now adds an uninstall command to rbenv to handle the removal of ruby versions, if you want to avoid manual rm -fr (which might be considered risky) and rbenv rehash suggested by @Stephenson. For removing ruby version 1.9.3-p0 you would run the following:
rbenv uninstall 1.9.3-p0
Possible to deactivate rbenv?
ruby - How do you uninstall rbenv on macOS? - Stack Overflow
Trying to uninstall rbenv
any way to uninstall ruby using rbenv
My console is showing; I tried rbenv deactivate but thats command not found.
Is there a way to remove it from my python directory but keep it for my ruby or rails directory? I am using ohmyzsh and zsh
~/Developer/Python/CS50_Python (ruby icon) 3.3.0
I took these steps to successfully get rid of rbenv on my mac running El Capitan (10.11.4). Rbenv is a major cause of Failed to build gem native extension errors from my experience.
- Remove using brew:
brew remove rbenv - Delete
.rbenvdirectory:rm -rf ~/.rbenv
For Bash
- Open
.bash_profilefile and delete any lines with rbenv in them:vi ~/.bash_profile - Open
.bashrcfile and delete any lines with rbenv in them:vi ~/.bashrc
Finally, reload .bash_profile and .bashrc:
. ~/.bash_profile && . ~/.bashrc
For ZShell
- Open
.zprofilefile and delete any lines with rbenv in them - Open
.zshrcfile and delete any lines with rbenv in them
Finally, reload .zprofile and .zshrc:
. ~/.zprofile && . ~/.zshrc
I think you should be able to uninstall rbenv by simply removing ~/.rbenv.
rm -rf ~/.rbenv
Or, if you installed rbenv via Homebrew, you can do
rm -rf `brew --prefix`/Cellar/rbenv