How to uninstall PostgreSQL installed from .run file?

I am a new Ubuntu 12.04 user and I'm using 64bit.

This morning I installed Posgresql 9.2 from the graphical installer (not from Ubuntu repository) . Now I want to uninstall it, but I don't know how.

Anyone please show me the way out?


The installer should have installed also a program called uninstall-postgresql. Open a terminal and run

sudo uninstall-postgresql

This should work. If the shell complains that it cannot find the program (command not found), find where it was installed:

sudo updatedb
locate uninstall-postgresql

and run it with the full path returned by locate.


Welcome to Ubuntu!

Generally, in such a situation, you would try to find your program in Software Center or Synaptic Package Manager and then remove from there.

Specifically in this case, it appears there is a script somewhr that is made for this purpose. According to this post, there is a uninstall-postgresql script that you can run by opening Terminal and typing that in. If that doesnt work, that post has more information that you can go through.