# 모든 루비젬 삭제
모든 루비젬 삭제하는 좋은 방법 있을까요?
haesamq님의 답변
## 스크립트
```
#!/usr/bin/env bash
uninstall() {
list=`gem list --no-versions`
for gem in $list; do
gem uninstall $gem -aIx
done
gem list
gem install bundler
}
#rbenv versions --bare
RBENVPATH=`rbenv root`
echo $RBENVPATH
RUBIES=`ls $RBENVPATH/versions`
for ruby in $RUBIES; do
echo '---------------------------------------'
echo $ruby
rbenv local $ruby
uninstall
done
```
## 레퍼런스
+ https://gist.github.com/IanVaughan/2902499