How do I uninstall ruby from my cygwin installation
My cygwin installation contains the following ruby binaries, how can I uninstall these binaries since I would like to use ruby 192 on my windows vi开发者_开发问答sta machine
ruby.exe
rubyw.exe
To uninstall any package on Cygwin, run setup-x86.exe
or setup-x86_64.exe
(which you should already have, or you can get them here), select "ruby" under "interpreters", click the round arrow icon until it says "Uninstall", then continue. This will remove the executables and libraries and take care of any dependencies. You could remove the files directly, but that might leave the system in an inconsistent state, and you might miss something.
Cygwin doesn't seem to have Ruby 1.9.2 yet, unfortunately (NOTE: I wrote this several years ago and I'm not currently able to check). How do you intend to install it? If you're going to install a pure Windows (non-Cygwin) version of ruby, you may not need to uninstall the Cygwin version. For example, I have both Cygwin Perl and ActiveState Perl on my Windows 7 system; I use one from the Cygwin environment, the other from the Windows environment.
Or I suppose you could build ruby 1.9.2 from source under Cygwin; in that case, yes, you would want to uninstall the Cygwin ruby installation first.
(As I write this update, the latest version of Ruby is 2.3.2.)
http://www.ruby-lang.org/en/downloads/ has more information about ways to install ruby (but nothing specific about Cygwin).
I have tried what says in Cygwin docs:
2.18.
How do I uninstall individual packages?
Run Cygwin Setup as you would to install packages. In the list of packages to install, browse the relevant category or click on the
View'' button to get a full listing. Click on the cycle glyph until the action reads
Uninstall''. Proceed by clicking ``Next''.
But it did not work, I did it for "All Users" and for "My User" when running Setup.
So I finally repeated the process but without checking "Select required packages(RECOMMENDED)" and that time it worked. Now:
$ ruby -v
-bash: ruby: command not found
As last step I deleted the .gem
file in my home Cygwin folder.
As an alternative, you can use RVM (Ruby Version Manager) to install Ruby 1.9.2 while keeping your current version available. You'll need to have curl, git, automake and mingw to install and compile Ruby.
精彩评论