Skip to content

Instantly share code, notes, and snippets.

@ku1ik
Forked from solnic/rvm_remove_old.sh
Created December 4, 2012 10:52
Show Gist options
  • Save ku1ik/4202628 to your computer and use it in GitHub Desktop.
Save ku1ik/4202628 to your computer and use it in GitHub Desktop.
Remove all rubies older than given date
#!/bin/bash
DATE=${1:-2012-06-01} # allow passing date via DATE env var
for version in `find $rvm_path/rubies/ -mindepth 1 -maxdepth 1 -type d -not -newermt $DATE | cut -d / -f 7`; do rvm remove $version; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment