Monday, February 01, 2010

Tip of the Day: Clean up a PostgreSQL installation on MS Windows

The task: Uninstall PostgreSQL on MS Windows - completely. It seems obvious. Just go to System Preferences>Software and uninstall PostgreSQL. Not quite. Before you can call PostgreSQL fully uninstalled prior to a new installation attempt you must take care of what is left over while uninstalling.

The uninstallation process does not delete the databases. If you want to completely remove everything be sure to back up and delete C:\Program Files\PostgreSQL\8.3\data. This one was easy but there is one more.

PostgreSQL creates but does not remove the system user named 'postgres'. You can't see it in the user management dialog in System Preferences but you can still get rid of it. Open a command shell (also known as DOS-Box). Type in 'net user postgres'. If it exists it will show you details.
 To get rid of it execute 'net user /del postgres'

Have fun,
Sebastian


No comments: