Original Source Link
How can I remove Ruby on Rails and all associated gems?
yum remove ruby but get this response:
yum remove ruby
Loaded plugins: fastestmirror, security
Setting up Remove Process
No Match for argument: ruby
Loading mirror speeds from cached hostfile
* base: mirror01.th.ifl.net
* extras: mirror01.th.ifl.net
* updates: mirror01.th.ifl.net
No Packages marked for removal
If I write
$ruby -v or
$gem -v I still get their versions returned to me, which indicates that they’re installed.
try the following,
# yum provides ruby
# rpm -qa | grep -i ruby
This will display the RPMs that is currently installed that provides the ruby binary.
Once you have the name of the rpm you can then run the follow to remove the RPM from your system
# yum erase <package_name>
It might be possible that
- the ruby rpm was installed with a custom named rpm package
- that ruby was compiled with gcc on the current host
If so, then you will need to manually remove ruby libs and binaries from your system path.
You can locate binary by
# which ruby
Then you can proceed to remove it from your path.
Else search with find
# find / -name "*ruby*"
then proceed to remove the directories from you server.
I guess below command would be useful for you to uninstall RVM packages. Please execute one by one.
(it will give you what ruby packages are presently installed on your server)
rvm remove ruby_pkg_name
then once successfully executed above commands then check whether ruby uninstalls or not like
rails -v or
hope this will helpful for you!
removing ruby from the server i.e CentOs depends upon how you have installed it.
If it was install directly without rvm or rbenv then
yum remove ruby
sudo yum remove ruby
if it is installed using rvm
rvm remove 1.9.3-p551
rvm remove <ruby-version>
if its is installed using rbenv
rbenv uninstall 2.1.0
rbenv uninstall <ruby-version>