Skip to content

Instantly share code, notes, and snippets.

@chriskottom
Created October 7, 2010 13:42
Show Gist options
  • Save chriskottom/615117 to your computer and use it in GitHub Desktop.
Save chriskottom/615117 to your computer and use it in GitHub Desktop.
Complete uninstall of Ruby and all dependencies
#!/bin/bash
#
# ruby_uninstall.sh
# A Bash script for complete tear-down of my Ruby development environment.
# The script is custom made for my own personal configuration.
# - Removal of RVM artifacts stored under my home directory
# - Single base instance of Ruby installed from source under $PREFIX
# - Removal of executables for libraries and gems in my environment
#
#
# Script variables
#
PREFIX=/usr/local
#
# Remove RVM
#
echo "Removing RVM artifacts in user's home directory"
rvm implode
rm -rf ~/.rvm
#
# Remove executables
#
echo "Removing executables from $PREFIX"
cd $PREFIX/bin
sudo rm -f erb gem irb rake rdoc ri ruby testrb
#
# Remove libraries
#
echo "Removing Ruby libraries"
sudo rm $PREFIX/lib/libruby-static.a
sudo rm -r $PREFIX/lib/ruby/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment