How do you uninstall the rubygem application?
Solution 1
Here's what I did to remove rubygems installed from .tar.gz on a Ubuntu system:
aptitude install checkinstall
wget http://rubyforge.org/frs/download.php/69365/rubygems-1.3.6.tgz
tar xfvz rubygems-1.3.6.tgz
cd rubygems-1.3.6
checkinstall ruby setup.rb
When asked, give it a name 'rubygems'. At this moment we have reinstalled the rubygems. Now we need to uninstall it:
dpkg -r rubygems
rm /usr/bin/gem1.8
And that's it. Clean uninstall of rubygems.
Btw: it's recommended to uninstall all gems prior to this, by doing gem uninstall <gem-name>
on each gem.
Solution 2
In future, if you have to install from tar.gz files, it's worth using the excellent "checkinstall" program, you just preceded the install command (whatever that might be) with "checkinstall", which will create a deb package and then install it.
You might be able to reinstall rubygems now using checkinstall and then remove it immediately afterwards with dpkg -r packagename.
Related videos on Youtube
![Benjamin Bisinger](https://i.stack.imgur.com/KzRcI.jpg?s=256&g=1)
Benjamin Bisinger
Updated on September 17, 2022Comments
-
Benjamin Bisinger almost 2 years
We have installed the rubygem application (version 1.3.6) on a Debian system by downloading the rubygems tar.gz archive and running the setup.rb command.
What is the best way to uninstall this application?