Known versions of ruby - rvm list known [duplicate

2019-08-21 12:31发布

Possible Duplicate:
Deleting versions of ruby

I'm trying to uninstall a single version of ruby. The second in this list:

which -a ruby
/Users/snowcrash/.rvm/rubies/ruby-1.9.2-p318/bin/ruby
/Users/snowcrash/.rvm/bin/ruby

However, when I run:

rvm remove

I get:

Really? remove all? See "rvm list known" and limit the selection to something more sane please :)

So, running:

rvm list known 

shows a whole list of versions. However, none of these is the one I want to delete, i.e. /Users/snowcrash/.rvm/bin/ruby

E.g.

# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-p358]
[ruby-]1.8.7-head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2-p180
[ruby-]1.9.2-p290
[ruby-]1.9.2[-p318]
[ruby-]1.9.2-head
[ruby-]1.9.3-preview1
[ruby-]1.9.3-rc1
[ruby-]1.9.3-p0
[ruby-]1.9.3[-p125]
[ruby-]1.9.3-head
ruby-head

# GoRuby
goruby

# TheCodeShop - MRI experimental patches
tcs

# JRuby
jruby-1.2.0
jruby-1.3.1
jruby-1.4.0
jruby-1.6.5
jruby-1.6.5.1
jruby-1.6.6
jruby[-1.6.7]
jruby-head

# Rubinius
rbx-1.0.1
rbx-1.1.1
rbx-1.2.3
rbx-1.2.4
rbx[-head]
rbx-2.0.testing

# Ruby Enterprise Edition
ree-1.8.6
ree[-1.8.7][-2012.02]

# Kiji
kiji

# MagLev
maglev[-head]
maglev-1.0.0

# Mac OS X Snow Leopard Or Newer
macruby[-0.10]
macruby-nightly
macruby-head

# IronRuby -- Not implemented yet.
ironruby-0.9.3
ironruby-1.0-rc2
ironruby-head

标签: ruby rvm
2条回答
Bombasti
2楼-- · 2019-08-21 12:47

You lack knowledge of rvm:

$ rvm list
...
=* ruby-1.9.3-p327 [ x86_64 ]
...

$ rvm alias list
default => ruby-1.9.3-p327

now what is in the list can be removed:

$ rvm remove 1.9.3

and what is an alias has to be removed as alias:

$ rvm alias delete default

all this information is available at rvm site => https://rvm.io

查看更多
Emotional °昔
3楼-- · 2019-08-21 12:59

Aha - figured it out:

rvm uninstall all

Interestingly, this deletes all versions apart from the one I wanted to delete!

which -a ruby
/Users/snowcrash/.rvm/bin/ruby
查看更多
登录 后发表回答