How can I uninstall Ruby on ubuntu?
Solution 1
This command should do the trick (provided that you installed it using a dpkg-based packet manager):
aptitude purge ruby
Solution 2
Run the following command from your terminal:
sudo apt-get purge ruby
Usually works well for me.
Solution 3
At first find out where ruby is? then
rm -rf /usr/local/lib/ruby
rm -rf /usr/lib/ruby
rm -f /usr/local/bin/ruby
rm -f /usr/bin/ruby
rm -f /usr/local/bin/irb
rm -f /usr/bin/irb
rm -f /usr/local/bin/gem
rm -f /usr/bin/gem
Solution 4
Here is what sudo apt-get purge ruby*
removed relating to GRUB
for me:
grub-pc
grub-gfxpayload-lists
grub2-common
grub-pc-bin
grub-common
Solution 5
On Lubuntu, I just tried apt-get purge ruby* and as well as removing ruby, it looks like this command tried to remove various things to do with GRUB, which is a bit worrying for next time I want to reboot my computer. I can't yet say if any damage has really been done.
khanh
Hi, I'm Khanh, a seasoned software engineer based in VietNam
Updated on April 12, 2020Comments
-
khanh about 4 years
How can I uninstall Ruby 1.9.2dev (2010-07-02) [i486-linux] on ubuntu? Need to reinstall - please help
-
khanh over 13 yearsthanks for your response. It didn't sloved this problem. I execute this command and check ruby -v. it still show ruby 1.8.7
-
khanh over 13 years$ sudo aptitude purge ruby No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded. Need to get 0B of archives. After unpacking 0B will be used.
-
khanh over 13 years$ruby -v ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.02
-
jwueller over 13 yearsIt seems like aptitude did not find the package
ruby
on your system. Executedpkg -l | grep ruby
for a list of installed ruby-related packages. For exampleruby1.8
. -
khanh over 13 yearsyes. I execute this command. this is result libopenssl-ruby, ruby-enterprise 1.8.7-2010.02, ruby1.8 1.8.6.111-2ubuntu1...
-
jwueller over 13 yearsThen simply execute
aptitude purge ruby1.8
to remove that package. -
sestevez over 12 years
sudo apt-get purge ruby*
will remove grub! Be careful. -
theamoeba over 12 yearsOk, I have never seen that happen. I will look out for that :)
-
Francois about 12 yearsI did sudo apt-get purge ruby* but when I type ruby -v it shows ruby 1.9.2
-
Ang about 12 years@Francois I think you should use sudo apt-get remove ruby1.9.2 ? I have 1.9.1 installed and it works
-
Francois about 12 yearsyea seemed to do the trick, thanks, I keep tryping uninstall instead of remove :)
-
sh4 over 11 yearsThe same happened to me, but it gives you the clue on what packages yo have to uninstall to remove ruby. So just remove all the packages the apt suggested, except for the obvious ones you don't want to remove, like grub, and you are done.
-
vogdb almost 11 yearsIn my case also
sudo apt-get autoremove
was needed aftersudo apt-get remove ruby1.9.3
-
Nabil Kadimi about 10 yearsI suggest that you add
sudo
in your answer for lazy "copiers/pasters" like the person that wrote my comment. -
Shankar Regmi about 8 years@sestevez I accidently did
sudo apt-get purge ruby*
and I haven't turned off my system. Can I install grub and update grub