Currently I have the standard Emacs installation, 2.3.1, from Ubuntu repo, but would like to get a newer version of Emacs from GNU website, which is 2.3.4. My question is that do I need to wipe out my current installation completely and build it from scratch or I can just run the build script from the 2.3.4 and overwrite those file if found identical? Also, a general question, if I install third party software other than those from Ubuntu repo, most of them don't have any uninstall scripts, how do I get rid of those cleanly? Thanks a ton
Yes, you would want to uninstall emacs before installing it from source.
sudo apt-get remove emacs
That should do the trick.
If they do not provide an uninstall script (usually made when you do a make/make install) in the source folder, you are pretty much out of luck for uninstalling cleanly, unless you can figure out what all it installed and where.
I looked and couldn't find a current emacs repository, which makes install/uninstall much safer. In general, don't install outside of repos (or at the very least .debs), unless it is something you really need, just because it can be so messy.