How to uninstall RVM Ruby on Rails from Ubuntu 12..04LTS

1. sudo apt-get purge ruby*
This is the most quick method, but sometimes it seems not work properly due to mixing up somethng, when installing ruby.

But if you install RoR using RVM, :
rvm implode
and follow the prompt

2. If the command above doesn't work, do the following. Hope this will help

gedit remove_ruby.sh

then

#!/bin/bash

sudo rm -rf /usr/local/lib/ruby
sudo rm -rf /usr/lib/ruby
sudo rm -f /usr/local/bin/ruby
sudo rm -f /usr/bin/ruby
sudo rm -f /usr/local/bin/irb
sudo rm -f /usr/bin/irb
sudo rm -f /usr/local/bin/gem
sudo rm -f /usr/bin/gem


save and close. Then

chmod +x remove_ruby.sh
then
./remove_ruby.sh

Comments