Delete the .bashrc
entire line:
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
Edit the .bash_profile
line to remove only the RVM paths, so your line becomes:
export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/connorphillips/mongodb/bin
Your particular system may not have a .profile
file and that's fine.
Here's my script to remove RVM for the entire system, for all users.
https://github.com/SixArm/sixarm_unix_shell_scripts/blob/master/rvm-uninstall-danger
#!/bin/bash
#
# Uninstall RVM (Ruby Version Manager). THIS IS DANGEROUS.
#
# This runs rvm implode, delete RVM files from the system,
# deletes /home/*/.rvmrc files and /home/*/.rvm directories,
# and uninstalls all RVM gems. We run this script as root.
#
# Adjust as you like for your needs.
#
# Some of the script lines may report missing directories.
# For example, a Mac system typically has a /Users/ directory,
# whereas a Linux system typically has a /home/ directory.
# You can delete the lines that you don't need, if you like.
#
# If rvm implode gives errors like this loop:
#
# line 72: /usr/local/rvm/scripts/rvm: No such file or directory
#
# then the rvm setup is bonked and we can delete the rvm script
# by hand then run this script again; rvm implode won't work,
# but the rest of the script will do a decent job of deleting
# any lingering rvm files and reporting any remainders.
#
# Author: Joel Parker Henderson (joel@joelparkerhenderson.com)
# License: GPL
#
set -o nounset
set -o errexit
set -o pipefail
echo "rvm implode"
rvm implode
echo "remove rvm files from system-wide areas"
sudo rm -rf /usr/local/bin/rvm
sudo rm -rf /usr/local/rvm
sudo rm -rf /etc/rvmrc
sudo rm -rf /etc/profile.d/rvm.sh
echo "remove rvm files from all likely user areas"
sudo rm -rf /home/*/.rvmrc
sudo rm -rf /home/*/.rvm
sudo rm -rf /Users/*/.rvmrc
sudo rm -rf /Users/*/.rvm
echo "remove rvm files from the current user's home"
sudo rm -rf $HOME/.rvmrc
sudo rm -rf $HOME/.rvm
echo "uninstall rvm gem"
gem uninstall -a -q rvm
echo "delete rvm group"
sudo /usr/sbin/groupdel rvm
echo "try to find any remaining .rvmrc files to delete by hand"
find -L / -name .rvmrc
echo "try to find rvm text in configuration files to edit by hand"
find -L / -type f | grep "\(bash_login\|bash_profile\|bashrc\|profile\|zshenv\|zshrc\|zlogin\|zlogout\|zprofile\)$" | xargs -I{} grep -Iil "rvm" {}