Skip to content

Instantly share code, notes, and snippets.

@djanowski
Created July 13, 2010 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djanowski/474373 to your computer and use it in GitHub Desktop.
Save djanowski/474373 to your computer and use it in GitHub Desktop.
# Removing old Rubies in preparation for RVM
/usr/bin/gem list | awk '{ print $1 }' | xargs /usr/bin/gem uninstall -a --install-dir=/Library/Ruby/Gems/1.8 --bindir=/usr/bin
/usr/bin/gem list | awk '{ print $1 }' | xargs /usr/bin/gem uninstall -a --install-dir /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 --bindir=/usr/bin
/opt/local/bin/gem list | awk '{ print $1 }' | xargs /opt/local/bin/gem uninstall -a
for file in $(find /usr/bin -type f); do (head -n1 $file | grep '^#.*ruby' > /dev/null) && echo $file && rm $file; done
port installed | ack '^(j?ruby|rb\-)' | awk '{ print $1, $2 }' | xargs port uninstall
# You can still find this in /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin
rm /usr/bin/ruby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment