Rubygems: uninstall all gems without interactive y/n prompts

Created on 20 Mar 2019  路  3Comments  路  Source: rubygems/rubygems

I would like to uninstall all my gems.

If i run:

gem uninstall --all --force

I still get lots of prompts for "Remove executables", for instance:

Remove executables:
    ascii85

in addition to the gem? [Yn]

So I need to babysit the process and keep hitting return to get past all those prompts. This would be worse if I wanted to automate it for some reason.

Should there be a way to just bulk uninstall all gems without interactive prompts?

This is related to the discussion at #2331 and part of that same general issue of "prevent interactive prompts for automated processes", but a different use case than the one that ended up discussed there, so opening as a new issue per request of @hsbt .

feedback required feature request

Most helpful comment

This works for me:

gem uninstall --all --force --executables

All 3 comments

Possible workaround in the meantime, if you're on a *nix-ish system (e.g. Linux, macOS, BSD):

yes | gem uninstall --all --force

This works for me:

gem uninstall --all --force --executables

@jrochkind does @dbuckwalter or @duckinator suggestions would work for you?

Was this page helpful?
0 / 5 - 0 ratings