Do I have to manually uninstall all dependent gems? Do I have to manually uninstall all dependent gems? ruby ruby

Do I have to manually uninstall all dependent gems?


gem list | cut -d" " -f1 | xargs gem uninstall -aIx deletes all installed ruby gems!


As far as I know you're correct, there is not an easy way built-in to the gem command to do this.

However, you can check out gem-prune which can help clean up your gem repository after you've removed dm-core.

http://github.com/ddollar/gem-prune/tree/master


for gem in `gem list --no-version`; do  gem uninstall -aIx $gemdone

Works the best for me, not sure why but

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

doesn't work on my system as it still complains...

ERROR:  While executing gem ... (Gem::InstallError)    cannot uninstall, check `gem list -d some-gem-here`