Remove all gems in windows and linux

This is at the first results in google but here is a shortcut:

gem list | cut -d" " -f1 | xargs gem uninstall -aIx

This will remove all gems if you are developing in Linux. Here is more detailed description.

For windows developers there is also a quick tip. You have to start PowerShell to run that (hit start button and just type it, if you are using Windows7)

gem list | %{$_.split(' ')[0]} | %{gem uninstall -Iax $_ }

And the detailed explanations if you want to learn the commands.

Tagged with: , ,
Posted in Ruby

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Sites
Categories
Archives