Wednesday 10 April 2013

Uninstalling all gems

Some time back I was trying out jruby. I had installed multiple gems for it. Today, while cleaning up my system I was trying to get rid of it because it does not have much use to me. However, uninstalling the gems one by one is a pain. So, I wrote the following line to uninstall all gems.

jruby -S gem list | awk -F ' ' '{print $1}' | xargs jruby -S gem uninstall

P.S. : To understand how to construct such one liners please look at my previous post.

No comments: