On Windows 7, I'd like to install a brand new, fresh installation of PostgreSQL/PostGIS on a laptop, and wipe ALL the localhost servers, users, data and passwords clean, and then reinstall as if it had never been installed before. I have QGIS 1.8.0 running perfectly, but I'd like to create a PostGIS database. However, an idle and unnecessary installation already exists that I'd like to clean off or reset the password on.

I've done an 'uninstall' of Postgis, and then PostgreSQL, but that didn't remove the network service and former postgresql user. Reinstalling requires the same password and user as before, and so I'm stuck.

If there is an easy solution, without reinstalling Windows 7 or QGIS 1.8 (osgeo4w) then I'd like to go that route. What should I do in this situation?


The postgres user is normally hidden under Windows 7. You can delete it only in the Command Window with

net user postgres /delete

The postgres service can be deleted with sc delete postgresql-8.3 (or whatever version you are running).

For more details on how to uninstall postgres completely, see http://forums.enterprisedb.com/posts/list/1437.page

There are some registry entries to be removed manually.

  • which command window do I use in Windows 7 for that? I can't log into the SQL Shell (pgsl): I tried running that shell as administrator, entering "TRUST" as a password, but either I don't have TRUST administration setup, or don't understand how to use it. I tried some of the other command windows I have, running them as administrator, but either I'm not running the command from the correct directory or I'm using the wrong command window. I had tried using the following: the Administrator Command Promt (MS-DOS shell run as Administrator); MSYS, and OSGeo4W..reading link..Thx – user12711 May 23 '13 at 13:37
  • 1
    I was thinkining of sevenforums.com/tutorials/… – AndreJ May 23 '13 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.