Skip to content

Instantly share code, notes, and snippets.

View craigmartin's full-sized avatar

Craig Martin craigmartin

  • Glee Machine, LLC.
  • Portland OR
View GitHub Profile
@tommeier
tommeier / remove_system_gems.sh
Created February 10, 2011 00:24
Remove all the old crufty system gems
#Uninstall crappy old system gems
function remove_system_gems {
echo "Uninstalling all system gems... This could take a while..."
for x in `gem list --no-versions`; do gem uninstall $x --all --quiet --ignore-dependencies --user-install --executables; done
#TODO : Add check for trailing slash and remove
system_location=$@
if [ "$system_location" == "" ]; then
system_location='/Library/Ruby/Gems/1.8'
fi
folder_names=( 'specifications' 'gems' 'cache' 'doc' 'bundler/gems' )