Removing All Installed Gems and Starting Over

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

Uninstall all installed gems, in OSX?

You could also build out a new Gemfile and run bundle clean --force. This will remove all other gems that aren't included in the new Gemfile.

Uninstalling all gems Ruby 2.0.0

I used this one line script.

for i in `gem list --no-versions`; do gem uninstall -aIx $i; done

It ignores default gem errors and just proceeds. Simple and self-evident.

How to start over with a clean gems install for jekyll?

It is highly recommend to not use system ruby but use a ruby version manager. One reason is that you won't have to use sudo before your gem commands.

If you want to remove all your current gems you should be able to just do

gem uninstall --all

But you might need to prepend it with sudo gem uninstall --all

If you intend to do any longer term work / multiple projects with ruby, I recommend using RVM. You can find detailed install instructions here

Some prefer rbenv however it's install instructions seem to be focused on MacOS, so if you're on linux, I dunno.

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.

How to revert installed gems and all dependency versions as in old Gemfile.lock

You should try adding the specific version for the gems in your file. That way you will have the required dependent versions for a specific gem.

Should I remove all installed gems now that I'm planning on using RVM

No it will not. RVM creates a isolated environment for each gemset so there will be no interference from old gems outside your gemsets. You don't even have to use RVM, bundler will work a long way alone.

Also, welcome to another Rails developer, we are glad to have you! :D

How do you remove the documentation installed by gem install?

Gem documentation is installed in [RUBY]/lib/ruby/gems/doc, where [RUBY] is the directory into which you installed Ruby (C:/ruby on my machine).

I don't see why you shouldn't just delete the folders representing the gems for which don't don't need documentation: you can always regenerate it.



Related Topics



Leave a reply



Submit