BuycPanel Blog

BuycPanel Blog

Latest news and updates

How do you Uninstall Ruby installation Manually or Through the rpm/yum Commands?

Posted by Allura on 01 05 2019.

A Brief Overview
There are various methods in which you can uninstall Ruby installation. The methods are divided into three parts-Manually
Through rpm
Through yumThe details of these methods are as follows:MANUAL METHOD:
If Ruby has been compiled manually on your server, you can simply run the make uninstall command in the package directory.
Note:
After you have uninstalled Ruby from your server, please note that the system may leave several files and folders on your server.We highly recommend that you run the commands listed below to archive any Ruby files and folders that the uninstallcommand did not erase. This process will prevent conflicts with future installations of Ruby:1234
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` Please note that Ruby on Rails doesn’t function in Amazon Linux Server.Through rpm command
If you want to determine whether Ruby exists on your server or not, you can simply run the command shown below:rpm -qa|grep -i rubyThis command will return output that resembles the example listed below:1234567
# rpm -qa|grep -i…

A Brief Overview

There are various methods in which you can uninstall Ruby installation. The methods are divided into three parts-

  1. Manually
  2. Through rpm
  3. Through yum

The details of these methods are as follows:

MANUAL METHOD:

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

Note:

After you have uninstalled Ruby from your server, please note that the system may leave several files and folders on your server.

We highly recommend that you run the commands listed below to archive any Ruby files and folders that the uninstallcommand did not erase. This process will prevent 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`

 

Please note that Ruby on Rails doesn’t function in Amazon Linux Server.

Through rpm command

If you want to determine whether Ruby exists on your server or not, you can simply run the command shown below:

rpm -qa|grep -i ruby

This command will return output that resembles the example listed below:

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

 

If you want to remove a package, you can simply run the rpm  e –nodeps packagename command, where packagename will represent the name of a package.

Through yum

Warning:

It should be noted that we have deprecated the legacy Ruby codebase in cPanel & WHM version 66. If you create any applications with the interfaces listed below, please note that those will not be supported:

  • Ruby on Rails interface of cPanel (cPanel >> Home >> Software >> Ruby on Rails).
  • RubyGemsinterface of cPanel (cPanel >> Home >> Software >> RubyGems).
  • The Ruby Gem installerthat is present in WHM’s Module Installers interface (WHM >> Home >> Software >> Module Installers).

If you want to install Ruby and create Ruby web applications in cPanel & WHM version 66 or later, you can follow the directions that are laid out in our How to Create Ruby Web Applications documentation.

 

If you want to determine whether Ruby exists on your server you can simply run the following command:

yum provides ruby

The command will return output that resembles the example given below:

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

 

If you want to remove a package, you can run the yum erase packagename command, where packagename will represent the name of a package.

Concluding thoughts

This document will detail the uninstallation process of Ruby installation manually, through rpm and yum commands.