The Windows uninstaller of PostgreSQL 9.1 does not remove
postgres service account or the server data directory, for which the default value is
To completely remove all PostgreSQL artefacts, run the uninstaller, open an elevated command prompt, and issue the following commands:
net user /delete postgres rmdir /s /q "C:Program FilesPostgreSQL" del %temp%install-postgresql.log del %temp%uninstall-postgresql.log del %temp%bitrock_installer*.log
This performs the following cleanup tasks:
- Remove the
- Remove Postgres’s program files directory, which implicitly removes the data directory as well.
- Delete all log files created during the installation and uninstallation processes. The last command uses a glob because the BitRock installer generates a new file every time it is run.