Skip to content

Instantly share code, notes, and snippets.

@grimzy
Created November 17, 2019 18:43
Show Gist options
  • Save grimzy/83d8a5acc9eeacce6539b89aa5e2c6ca to your computer and use it in GitHub Desktop.
Save grimzy/83d8a5acc9eeacce6539b89aa5e2c6ca to your computer and use it in GitHub Desktop.
Uninstall all gems
#!/usr/bin/env bash
RUBIES=$(rbenv versions --bare)
for ruby in $RUBIES; do
rbenv local "$ruby"
gem list --no-versions | xargs -I {} gem uninstall "{}" -aIx
done
gem list --no-versions | xargs -I {} gem uninstall "{}" -aIx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment