Perish

博客园 首页 联系 订阅 管理

Some time you may need to uninstall all the installed Ruby gems. Uninstalling individual gems is tedious job. Here you will find how to uninstall all the installed Ruby gems using single command.

First, we need a list of installed gems. Its easier to get list of installed gems by using the command:

gem list --no-version

The command to uninstall all the matching version of gems without any confirmation of dependencies and executables is:

gem uninstall -aIx GEM_NAME

Now, we use xargs command to uninstall all the installed gems:

gem list --no-version | xargs gem uninstall -aIx

If your system requires sudo privilege to uninstall gems use:

gem list –no-version | sudo xargs gem uninstall -aIxM


from:http://codefundas.blogspot.co.at/2010_10_01_archive.html
posted on 2012-12-12 09:55  ---小青年---  阅读(476)  评论(0)    收藏  举报