Thursday, March 31, 2011

How to uninstall all Ruby gems

If you ever need to uninstall all gems in your system, just use:

sudo gem uninstall --all --ignore-dependencies `sudo gem list --no-versions`
If you are in  widows, remove the 'sudo' part.

If you are using 'rvm' prepend rvm to the gem commands.

If you were using bundler, you only need to reinstall bundler gem, and run the bundler install, to have removed obsolete gems.

No comments:

Post a Comment