Rvm: Uninstalling All Gems of a Gemset

RVM: Uninstalling all gems of a gemset

Use the gemset empty command:

rvm gemset empty mygems

Remove Gem from RVM Gemset?

How about gem uninstall rspec -v=2.0.0.beta.19 ? Check gem help uninstall for details.

Or you can just uninstall all versions and then install the one you need.

How to use RVM to uninstall all gem inside a gemset except rails?

Doing this would be a bad idea.

Rails depends on several gems (it is, in fact, several gems itself).

Therefore, you're going to remove rails' dependencies and won't be able to run it anymore (and as rubygems is smart, it'll remove rails at the same time than the dependencies).

The best way would therefore to remove the gemset.

rvm gemset delete <your gemset>

Then to recreate it and install rails

rvm gemset create <your gemset>
gem install rails

RVM remove all rubies and all corresponding gemsets

rvm remove all should do this for you.

The alternative is to just reinstall rvm after an implode and that usually doesn't take too long.

RVM: List all gems in current gemset ignoring global & default

for global:

rvm @global do gem list

for other gemsets:

GEM_PATH=$GEM_HOME gem list

@global is a gemset that all other gemsets inherit for given ruby, it does not inherit for m itself so it's safe to select it and run gem list in it's context.

For all other gemsets you can use the fact that gem list displays gems from all paths available in GEM_HOME and GEM_PATH, resetting GEM_PATH to be equal GEM_HOME will make only one path available - the one from GEM_HOME so gem list will only show gems in the selected gemset, ignoring all other gemsets (at this time the @global, but RVM 2.0 will support multiple gemsets inheritance).

How do I uninstall ruby and gems using RVM?

Basically taken from http://beginrescueend.com/rvm/:

To list the available ruby versions to install type:

rvm list known

To then install from the list of known, type:

rvm install VERSION_NUMBER

To then use the ruby version you have installed:

rvm use VERSION_NUMBER

You can make a certain ruby version your system default version:

rvm use VERSION_NUMBER --default

To remove the ruby version and keep the gemsets:

rvm uninstall VERSION_NUMBER

To remove ruby and its associated gemsets:

rvm remove VERSION_NUMBER

To learn about your ruby environment and where they are installed / aliased:

rvm info

Removing all installed Gems and starting over

From the RVM support site:

RVM installs everything into ~/.rvm.
To remove RVM from your system run 'rm
-rf ~/.rvm'. You may have one additional config file in ~/.rvmrc and
of course the RVM hook in your
bash/zsh startup files.

So, just go to the command line and type rm -rf ~/.rvm

All the installed gems are in the ~/.rvm folders, so doing the above will remove the gems and installed rubies in one go.

Gems you added pre-RVM with the default ruby install can be removed by typing this at the command prompt:

for x in `gem list --no-versions`; do gem uninstall $x -a -x -I; done

Uninstalling gems installed by me from default and global gemsets

If you are using RVM and want to remove all the gems installed there, you can use

rvm gemset empty <gemset>

This will basically remove all gems from the gemset you specify, then you'll have a blank slate to start over installing things that you only care about.

Delete RVM Gemset with @ sign in it

Per mpapis comment, I updated RVM and the troublesome gemset went away. Looks like I stumbled onto a bug that had been fixed and I just needed to update RVM.

To update RVM: rvm get head



Related Topics



Leave a reply



Submit