I am trying to completely remove my Ruby and Rails installation.

After uninstalling Ruby with apt-get remove ruby1.9.1 I see that all the Ruby stuff like ruby, rake and irb from "/usr/bin" was removed but the gems remain here:


What's the best way to remove these? Again, I want to uninstall everything so I can try this install again.

rm -r /var/lib/gems/ ???
  • apt-get remove --purge might be what you are looking for – user130370 Feb 11 '13 at 18:15
  • Does dpkg -S /path/to/gemfile show any package? – user130370 Feb 11 '13 at 23:48

After arm wrestling with this for most of the day, I uninstalled everything, installed RVM and then installed Ruby and Rails with RVM. Much, much better.


You should have 'gem uninstall *' or --purge on apt-get remove. However, you can safely

rm -r /var/lib/gems/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.