如何卸载通过 ruby-install 安装的 ruby [英] How to uninstall ruby installed by ruby-install
问题描述
我在 ~/.rubies
下通过 ruby-install 安装了许多 rubies:
I have many rubies installed by ruby-install under ~/.rubies
:
ls .rubies
ruby-1.9.3-p545 ruby-2.0.0-p598 ruby-2.1.3 ruby-2.1.5
ruby-2.0.0-p451 ruby-2.1.2 ruby-2.1.4 ruby-2.2.0
我想卸载 ruby-install 安装的其中一个 ruby,我该怎么做?
I want to uninstall one of the ruby installed by ruby-install, How do I do that?
推荐答案
不幸的是,ruby-install
只是下载和编译 Ruby,没有删除它的选项,不像 RVM
或 rbenv
.
Unfortunately appears that ruby-install
just downloads and compiles Ruby, with no option to remove it, unlike RVM
or rbenv
.
因此,您可能需要在此处运行一些手动命令来删除所有已安装的文件.
So, probably you'll need to run some manual commands here to delete all installed files.
通常ruby-install
会在~/.rubies/
文件夹中安装rubies.
Usually ruby-install
will install rubies in ~/.rubies/
folder.
如果您不确定使用 ruby-install
安装了哪个 ruby,请找到文件 .installed.list
,因为它包含在 Ruby 期间安装的文件列表安装.如果您想快速找到它,只需运行 locate .installed.list
即可获得它们的简短列表.
If you're not sure which ruby was installed using ruby-install
, locate the file .installed.list
, as it has a list of installed files during Ruby install. If you want to quickly locate it, just run locate .installed.list
and you'll get a short list of them.
然后在位于您要删除的版本的文件上运行 cat
,以确保哪个是您要删除的 ruby 安装的根文件夹.
Then run a cat
on the file located at the version you want to remove, to make sure which is the root folder for the ruby install you want to delete.
然后你可以删除目标版本所在的文件夹.
Then you can just remove the folder where the target version is located.
如果你想删除ruby-1.9.3-p545
,运行:
rm -Rf ~/.rubies/ruby-1.9.3-p545
这篇关于如何卸载通过 ruby-install 安装的 ruby的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!