Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Cleanup outdated gems from all your rvm gemsets
echo "NB! This process could be too destructive sometimes and you may need to run 'bundle' command from your project directory."
echo "Do you want to cleanup all gemsets?"
read -p "(anything other than 'yes' will cancel) > " ANSWER
if [[ $ANSWER != "yes" ]]
echo "Phew...\nMay be another day."
for gemset in `ls $rvm_path/gems | grep @`
echo "Switching to gemset $gemset"
rvm $gemset do gem cleanup
echo "\nAll gemsets are clean and shiny!"
exit 0

This comment has been minimized.

Copy link

@ojab ojab commented Aug 23, 2017

rvm all-gemsets do gem cleanup?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.