How do you remove the documentation installed by gem install?

bloudermilk picture bloudermilk · Nov 29, 2009 · Viewed 9.5k times · Source

I know it's possible to install a gem without the documentation, but unfortunately, I didn't for the first three months I used ruby. In that time, I managed to install a significant amount of gems, but not once since I started using ruby have I used the documentation on my computer. I always look to docs on the internet.

What is the best way to safely remove the documentation from my computer? Also, is there a way to configure ruby to not install documentation by default?

Answer

marekj picture marekj · Apr 19, 2012

run this command:

rm -r "$(gem env gemdir)"/doc/*

on windows if you use cygwin