Skip to content

Instantly share code, notes, and snippets.

@deoren
Last active January 23, 2018 03:52
Show Gist options
  • Save deoren/04efdece1dc60a6bf6879f09263f4ac6 to your computer and use it in GitHub Desktop.
Save deoren/04efdece1dc60a6bf6879f09263f4ac6 to your computer and use it in GitHub Desktop.
Ubuntu: Prune ruby gems

Remove all ruby gems installed system-wide

What

Remove all gems

Why

Prepare to move away from system-installs of gems to vendor/bundle "packages"

How

for gem in $(gem list | awk '{print $1}'); do echo "Y" | gem clean $gem ; done

for gem in $(gem list | awk '{print $1}'); do echo "Y" | gem uninstall $gem ; done

@deoren
Copy link
Author

deoren commented Jan 23, 2018

As of the time this Gist entry was created, GitHub does not support notifications for comments for mentions to Gist entries (see isaacs/github#21 for details). Please contact me via Twitter or file an issue in the deoren/leave-feedback repo (created for that very purpose) if you wish to receive a response for your feedback. Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment