RVM: Uninstalling all gems of a gemset

后端 未结 7 801
Happy的楠姐
Happy的楠姐 2020-12-12 10:35

I have global gems and various gemsets. I want to remove all gems of a gemset. Is there a way do to this, besides uninstalling the gemset?

相关标签:
7条回答
  • 2020-12-12 10:45

    Use the gemset empty command:

    rvm gemset empty mygems
    0 讨论(0)
  • 2020-12-12 10:48

    rvm gemset empty <gemset name>

    This will remove all gems from your mentioned gemset.

    0 讨论(0)
  • 2020-12-12 10:49

    This command removes all the ruby gems installed locally in 1-step Works well in Ubuntu 10.10

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

    PS - removes all local gems. Use sudo accordingly.

    0 讨论(0)
  • 2020-12-12 10:56

    you can also use rvm --force gemset empty

    0 讨论(0)
  • 2020-12-12 10:57

    rvm gemset empty <gemset> works, but only if you specify a gemset name.

    If you want to empty the default gemset, you need to pass an empty string for the gemset name.

    rvm gemset empty mygems ""

    0 讨论(0)
  • 2020-12-12 10:57

    Isn't removing all the gems out of a gemset essentially the same operation as deleting a gemset and then adding it back? Why not just do this:

    $ rvm gemset mygemset
    $ rvm gemset delete mygemset
    $ rvm gemset create mygemset
    
    0 讨论(0)
提交回复
热议问题