Ruby Journal

How to Uninstall All Ruby Gems

| Comments

In order to uninstall all gems, you have to loop through all entries in gem list with bash scripting. This method is very inconveninent. Thanks to Rubygems 2.1.0, you now could do it with one command.

Firstly, please make sure you upgrade your Rubygems to 2.1.0 or newer:

1
2
3
gem update --system
gem --version
# 2.1.8

and in order to uninstall all gems:

1
gem uninstall --all

That’s it folks!

Comments