to uninstall an RPM:
rpm -e foo.rpm
But usually, you can just "upgrade" RPMs with the -U flag.
to uninstall source:
You have a few options, many programs support "make uninstall".
You go into the directory where you unpacked the source, and run "make uninstall"
This doesnt always work, so I suggest you look at a program called "Checkinstall".
You run "checkinstall" instead of the "make install" command, and it will make an RPM and put it in the database, allowing you to uninstall programs via "rpm -e"
Checkinstall works with DEB and TGZ too.