Uninstall Ruby on Rails on CentOS 6

18,574

try the following,

# yum provides ruby

or

# 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

  1. the ruby rpm was installed with a custom named rpm package
  2. 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.

Share:
18,574

Related videos on Youtube

Stefan
Author by

Stefan

Updated on September 18, 2022

Comments

  • Stefan
    Stefan almost 2 years

    How can I remove Ruby on Rails and all associated gems?

    I tried 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 $rails -v, $ruby -v or $gem -v I still get their versions returned to me, which indicates that they're installed.

    • jpganz18
      jpganz18 about 11 years
      have you tried with yum purge ruby?
    • Stefan
      Stefan about 11 years
      I get No such command: purge. Please use /usr/bin/yum --help
    • FooBee
      FooBee about 11 years
      How did you install it in the first place? yum remove etc. will only work if you installed it with yum and not if you used some ruby tools like gem or whatever they call this.
    • jpganz18
      jpganz18 about 11 years
    • Stefan
      Stefan about 11 years
      It was so long ago, I cannot remember how I installed it.