15

I had PostGis installed on my machine, and somehow, some files got corrupted. I want to uninstall and reinstall PostGIS to hopefully get things working again, but I am not sure how to go about this.

I am running Windows 8.1. I've tried searching for it in the Control Panel under Programs and Features but PostGIS doesn't show up there. I've also tried in the StackBuilder but there are no uninstall options.

A Google search also turned up nothing useful.

Has anyone done this before? Is it possible to uninstall and reinstall PostGIS with doing the same for the whole Postgres?

CodyBugstein
  • 21,984
  • 61
  • 207
  • 363
  • How did you install it? Postgis is just a dll, so you won't see it in programs. There is also a bunch of sql files that install the functions and link them to the dll, which in recent versions are enabled by create extension. Which files got corrupted? – John Powell Sep 10 '14 at 17:27
  • I've installed PostGIS via StackBuilder, and I see something like "PostGIS 2.1.1, PgRouting 2.0 for PostgreSQL x64 9.3 (remove only)" in Programs and Features. So if you install it the same way, I'm not sure why your not seeing it here. – Mike T Sep 10 '14 at 20:37
  • 1
    Solved! http://stackoverflow.com/a/25768371/1675976 – CodyBugstein Sep 11 '14 at 01:55
  • "some files got corrupted" should be cause for an urgent backup of your current database, a file-system check, a hard drive SMART test, and checking of all temperature sensors etc, as well as a malware check. It is not normal or acceptable to have some things "get corrupted". Something is badly wrong. Make sure your backups are up to date and take action, don't ignore the problem. – Craig Ringer Sep 11 '14 at 02:06
  • check my answer – Sameer Kazi May 10 '17 at 10:16

1 Answers1

18

this work for me

And for remove postgis from your database run below query

   drop extension PostGIS

To check postgisis version run query in query panel

   SELECT PostGIS_full_version();
Sameer Kazi
  • 17,129
  • 2
  • 34
  • 46