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 .rbenv directory: rm -rf ~/.rbenv

For Bash

  • Open .bash_profile file and delete any lines with rbenv in them: vi ~/.bash_profile
  • Open .bashrc file and delete any lines with rbenv in them: vi ~/.bashrc

Finally, reload .bash_profile and .bashrc:

. ~/.bash_profile && . ~/.bashrc

For ZShell

  • Open .zprofile file and delete any lines with rbenv in them
  • Open .zshrc file and delete any lines with rbenv in them

Finally, reload .zprofile and .zshrc:

. ~/.zprofile && . ~/.zshrc

Answer from pyfork on Stack Overflow
🌐
GitHub
github.com › rbenv › rbenv › issues › 148
uninstall? · Issue #148 · rbenv/rbenv
November 19, 2011 - rbenv / rbenv Public · Notifications · You must be signed in to change notification settings · Fork 1.4k · Star 16.7k · New issueCopy link · New issueCopy link · Closed · Closed · uninstall?#148 · Copy link · cj · opened · on Nov 19, 2011 · Issue body actions ·
Author   cj
Discussions

Possible to deactivate rbenv?
It's not quite deactivation, but maybe an `rbenv shell system` or add a `.ruby-version` file with `system` as its contents. More on reddit.com
🌐 r/ruby
4
2
June 8, 2024
Uninstall Ruby, rbenv and homebrew and reinstall Ruby on Rails with RVM on MAC - Stack Overflow
I went through instructions as ...com/setup/macos/10.10-yosemite then when I got to the point to install Rails with " gem install rails " I got this error: Error installing rails: ERROR: Failed to build gem native extension. Now I want to roll-back everything and uninstall rbenv and it's ruby ... More on stackoverflow.com
🌐 stackoverflow.com
Trying to uninstall rbenv
Hi. I have been trying to uninstall rbenv, however it seems to be lingering on my system! I used sudo apt-get remove rbenv, and it said it had removed it. However, when I ran this command: user@use... More on github.com
🌐 github.com
2
September 26, 2016
How to start over (uninstall Ruby, gems, anything else)?
I'm running Ruby with rbenv and I have a bunch of gems. I'd like to start fresh but I'm a total n00b in this regard. Please help! Share ... i did. easily that was the first thing i tried. i'm here bc i can't figure it out. i totally don't get how ruby is entrenched in macos. More on reddit.com
🌐 r/ruby
3
1
December 18, 2016
🌐
GitHub
github.com › rbenv › rbenv
GitHub - rbenv/rbenv: Manage your app's Ruby environment · GitHub
While disabled, rbenv will still be accessible on the command line, but your Ruby apps won't be affected by version switching. To completely uninstall rbenv, perform step (1) and then remove the rbenv root directory.
Starred by 16.7K users
Forked by 1.4K users
Languages   Shell 97.8% | Ruby 1.6%
🌐
Karloespiritu
karloespiritu.github.io › cheatsheets › rbenv
rbenv · Cheatsheets
# Install rbenv $ brew install rbenv # Completely uninstall rbenv $ brew uninstall rbenv # list all available versions $ rbenv install -l # install a specific Ruby version $ rbenv install 2.3.0 # Sets a local application-specific Ruby version # by writing the version name to a `.ruby-version` ...
🌐
Mac Install Guide
mac.install.guide › ruby › 9
Uninstall Ruby · Mac Install Guide
June 16, 2021 - rvm uninstall just removes the folder under ~/.rvm/rubies. In most cases, you should use rvm remove. For example: $ rvm list rubies ruby-3.4.1 $ rvm remove ruby-3.4.1 · See Removing Rubies with RVM.
🌐
Medium
medium.com › @lslozano › installing-ruby-version-manager-on-my-macbook-887dcfe45e99
How to install Ruby Version Manager on Macbook | by Luis Lozano | Medium
October 17, 2022 - At Checking for rbenv shims in PATH I got none. What did I had to do to restore my files and get back to a clean slate? I turned to my google skills. After some research, I found some instructions on github that specified how to uninstall rbenv.
🌐
Reddit
reddit.com › r/ruby › possible to deactivate rbenv?
r/ruby on Reddit: Possible to deactivate rbenv?
June 8, 2024 -

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                        
🌐
Mike Lynch
mikelynchgames.com › home › switching to rvm from rbenv
Switching to rvm from rbenv - Mike Lynch
September 9, 2016 - Then I removed it from my .bash_profile located in my home directory. You can edit it with your favorite editor, and remove the lines that refer to rbenv.
Find elsewhere
🌐
OnWorks
onworks.net › home
rbenv-uninstall
Run online rbenv-uninstall in free Ubuntu online, free Fedora online, free Windows online emulator or free MACOS online emulator by OnWorks
🌐
Nicedoc
nicedoc.io › rbenv › rbenv
Nicedoc
June 22, 2022 - pretty README as service
🌐
GitHub
github.com › rbenv › rbenv › issues › 933
Trying to uninstall rbenv · Issue #933 · rbenv/rbenv
September 26, 2016 - Hi. I have been trying to uninstall rbenv, however it seems to be lingering on my system! I used sudo apt-get remove rbenv, and it said it had removed it. However, when I ran this command: user@use...
Author   BytesDirect
🌐
Arturgruchala
arturgruchala.com › rbenv-to-asdf
Deprecation of rbenv on Bitrise: Switching to asdf
September 25, 2023 - Compatibility: asdf is compatible with both Unix and Unix-like systems including macOS, and it also works well with the Windows Subsystem for Linux (WSL). Global and Local Version Management: asdf allows you to set global versions for your languages/tools, but also override them on a per-project basis. This gives you a lot of flexibility in managing versions. Before uninstalling rbenv, it's important to uninstall any existing versions of Ruby that were installed through rbenv.
🌐
Reddit
reddit.com › r/ruby › how to start over (uninstall ruby, gems, anything else)?
r/ruby on Reddit: How to start over (uninstall Ruby, gems, anything else)?
December 18, 2016 - I'm at the end of my rope with my MacBook reverting to referencing some Ruby 2.6 version I can't remove because it seems to be built into my operating system... ... My .rbenv dir had hit 40GB, so here's how I fixed it.
🌐
DEV Community
dev.to › sarahcssiqueira › managing-ruby-versions-on-macos-apple-silicon-with-rbenv-1mon
Managing Ruby versions on macOS Apple Silicon with rbenv - DEV Community
September 14, 2024 - This updates rbenv's shims, making the new commands available in your shell. Uninstalling Ruby Versions: If you ever need to remove a Ruby version, simply run:
🌐
Ruby Toolbox
ruby-toolbox.com › projects › sstephenson › rbenv
Project: sstephenson/rbenv - The Ruby Toolbox
The ruby-build plugin provides an rbenv uninstall command to automate the removal process.
🌐
CopyProgramming
copyprogramming.com › howto › uninstall-ruby-version-from-rbenv
Ruby: Removing a specific version of Ruby from rbenv
August 21, 2023 - Ruby - How do you uninstall rbenv on macOS?, Rbenv is a major cause of Failed to build gem native extension errors from my experience. Remove using brew: brew remove rbenv. Delete .rbenv directory: rm -rf ~/.rbenv. Open .bash_profile file and delete any lines with rbenv in them: vi ~/.bash_profile.
🌐
GitHub
raw.githubusercontent.com › rbenv › rbenv › master › README.md
https://raw.githubusercontent.com/rbenv/rbenv/mast...
This will **delete all Ruby versions** ... the rbenv package removal: - Homebrew: `brew uninstall rbenv` - Debian, Ubuntu, and their derivatives: `sudo apt purge rbenv` - Archlinux and its derivatives: `sudo pacman -R rbenv` ## Development Tests are executed using [Bats](https...
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-install-ruby-on-rails-with-rbenv-on-macos
How To Install Ruby on Rails with rbenv on macOS | DigitalOcean
December 1, 2022 - For example, run the following to uninstall Ruby version ... With the rbenv uninstall command you can clean up old versions of Ruby so that you do not have more installed than you are currently using.