Uninstall conflicting versions of ImageMagick?

In irb when I enter “require ‘RMagick’” I get:

RuntimeError: This installation of RMagick was configured with
ImageMagick 6.5.7 but ImageMagick 6.5.5-10 is in use.

from /usr/lib/ruby/1.8/i486-linux/RMagick2.so
from /usr/lib/ruby/1.8/RMagick.rb:11
from (irb):2:in `require’
from (irb):2
from /usr/lib/ruby/1.8/RMagick.rb:1513

I have upgraded Ubuntu several times (even after formatting the main
partition). I did keep my home partition intact. I also recently
installed rvm. I can’t seem to figure out how to uninstall the 6.5.5-10
conflicting version of ImageMagick. How can I identify precisely what
files to get rid of to avoid breaking anything?

This would be a big help. :slight_smile: