You may sometime wish to ‘clean’ the machine down and remove all traces of PostgreSQL. There are a series of steps for PostgreSQL uninstall:
–> Well, when uninstalling the server package, all running process are stopped ,you don’t have to stop it.
–> Lists your installed PostgreSQL packages [ rpm -qa|grep postg ]
–> Remove the RPMs [ rpm -e package-name ] if you remove all RPMs in one command, the order is irrelevant. If you remove them one at a time, you need to remove them in the order docs, jdbc, server, mainrpm and libs with docs first in order to avoid dependency problems.
–> And incase if you have multiple entries of PostgreSQL packages with same name use [ rpm -e –nodeps –allmatches package-name ]