I recently installed the Ruby Version Manager (RVM) and uninstalled it again, using this "scorched earth" script:
#!/bin/bash
/usr/bin/sudo rm -rf $HOME/.rvm $HOME/.rvmrc /etc/rvmrc
/etc/profile.d/rvm.sh /usr/local/rvm /usr/local/bin/rvm
/usr/bin/sudo /usr/sbin/groupdel rvm
/bin/echo "RVM is removed. Please check all .bashrc|.bash_profile|.profile|.zshrc for RVM source lines and delete or comment out if this was a Per-User installation."`
(I found this script here. I also tried more milquetoast approaches such as rvm implode
and rm -rf ~/.rvm
, etc.)
Now
$ which rvm
returns nothing, but rvm still seems to be there in some form, because when I type
$ rvm implode
I get a reaction, specifically:
cat: /Users/lolan/.rvm/VERSION: No such file or directory
Warning! PATH is not properly set up, '/Users/lolan/.rvm/gems/ruby-2.3.1/bin' is not available. Usually this is caused by shell initialization files. Search for 'PATH=...' entries. You can also re-add RVM to your profile by running: 'rvm get stable --auto-dotfiles'. To fix it temporarily in this shell session run: 'rvm use ruby-2.3.1'. To ignore this error add rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file.
-bash: /Users/lolan/.rvm/scripts/base: No such file or directory
-bash: /Users/lolan/.rvm/scripts/functions/implode: No such file or directory
Are you SURE you wish for rvm to implode?
This will recursively remove /Users/lolan/.rvm and other rvm traces?
(anything other than 'yes' will cancel) >
Psychologist intervened, cancelling implosion, crisis avoided :)
(This time I typed return when it prompted me for 'yes'. Other times I typed 'yes'.)
Basically, I'm mystified how $ which rvm
returns nothing, but $ rvm implode
doesn't return "command not found". This goes contrary to what I think I understand about the command line...
Anyway, how do I really kill RVM, together with its psychologist and all? :)
PS: I'm on macOS 10.12.
==============
UPDATE: It seems that despite having gone through all the standards steps for removing RVM (see above) and despite refreshing the shell (à la source .bash_profile
, source .bashrc
, source .profile
), the shell was still keeping some memory, somehow, of RVM, that went away when I started a brand new shell.
I'd still like to understand better how/what the shell was keeping around, because keeping bits and pieces of script folders (after the script folder in question has been deleted!?!?) seems dangerous and counterintuitive to me.