If it won't uninstall it is probably giving you an error saying something about it cannot find the uninstall file. If that's the case just remove the installation directory (C:\program files\Yahoo Messenger, or whatever).
Then type regedit in "Run" under the start menu. Export a copy of your registry to the desktop (THE ENTIRE REGISTRY). Then use the 'find' function to find all instances of "Yahoo" and delete them all.
Reboot the computer and you should be all set. If you get strange errors or something doesn't work right, go back into regedit and "Import Registry File", using the file you exported to the desktop. That will restore your settings before you changed anything.