Guide to Ruby Installations - Uninstall Ruby

Valid for versions 82 through the latest version

Version:

82


Last modified: May 13, 2020

Overview

You can use several different methods to uninstall Ruby.

Manual Compilation

If you manually compiled Ruby on your server, run the make uninstall command in the package directory.

After you uninstall Ruby from your server, the system may leave several files and folders on your server. We recommend that you run the following commands to archive any Ruby files and folders that the uninstall command did not remove. This process prevents conflicts with future installations of Ruby:

1
2
3
4
mv /usr/bin/ruby /usr/bin/ruby.bak`date +%F`
mv /usr/lib/ruby /usr/lib/ruby.bak`date +%F`
mv /usr/bin/gem /usr/bin/gem.bak`date +%F`
mv /usr/bin/rails /usr/bin/rails.bak`date +%F`

The rpm command

To determine whether Ruby exists on your server, run the following command:

rpm -qa|grep -i ruby

The command returns output that resembles the following example:

1
2
3
4
5
6
7
# rpm -qa|grep -i ruby
rubygems-1.3.7-5.el6.noarch
ruby-rdoc-1.8.7.374-4.el6_6.i686
ruby-libs-1.8.7.374-4.el6_6.i686
ruby-devel-1.8.7.374-4.el6_6.i686
ruby-1.8.7.374-4.el6_6.i686
ruby-irb-1.8.7.374-4.el6_6.i686

To remove a package, run the rpm e --nodeps packagename command, where packagename represents the name of a package.

The yum command

To determine whether Ruby exists on your server, run the following command:

yum provides ruby

The command returns output that resembles the following example:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# yum provides ruby
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: repos.dfw.quadranet.com
 * extras: mirror.oss.ou.edu
 * updates: centos-distro.cavecreek.net

ruby-1.8.7.374-2.el6.i686 : An interpreter of object-oriented scripting language
Repo        : base
Matched from:
ruby-1.8.7.374-3.el6_6.i686 : An interpreter of object-oriented scripting language
Repo        : updates
Matched from:
ruby-1.8.7.374-4.el6_6.i686 : An interpreter of object-oriented scripting language
Repo        : updates
Matched from:
ruby-1.8.7.374-4.el6_6.i686 : An interpreter of object-oriented scripting language
Repo        : installed
Matched from:
Other       : Provides-match: ruby

To remove a package, run the yum erase packagename command, where packagename represents the name of a package.

Deprecation

We deprecated the legacy Ruby codebase in cPanel & WHM version 66. We will not support any applications you create with the following interfaces:

  • cPanel’s Ruby on Rails interface (cPanel >> Home >> Software >> Ruby on Rails).

  • cPanel’s RubyGems interface (cPanel >> Home >> Software >> RubyGems).

  • The Ruby Gem installer feature in WHM’s Module Installers interface (WHM >> Home >> Software >> Module Installers).

To install Ruby and create Ruby web applications in cPanel & WHM version 66 and later, follow the directions in our How to Create Ruby Web Applications documentation.

Additional Documentation