How to remove PostgreSQL in Windows machine

Comprompt-PostgreSQL in Windows machine
PostgreSQL in Windows machine
Auto Uninstallation :-

i)Go to the Add/Remove Programs

ii) uninstall postgresql server
 or
go to the postgresql server installation directory
run the uninstaller.
Manual Uninstallation:
i) Remove the postgresql server installation directory.
 Suppose following default location then command on cmd
 (rd /s /q “C:\Program Files\PostgreSQL\8.3”)
ii) Delete the user ‘postgres’
net user postgres /delete
iii) Remove the Registry entries. (HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-8.3) and (HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Services\postgresql-8.3)
iv) Remove the postgresql-8.3 service.
sc delete postgresql-8.3
 
 
Courtesy :- 
Embedded System testing