I'd like to uninstall postgres on Mac OS 10.6 and start again with a completely fresh installation and empty databases.
I've killed all running postgres processes and tried to delete the postgres data directory, but no joy (see below): six databases are still there.
I've also tried to find the PGDATA variable, but it seems to be blank. Where are these databases living?
delirium:~ ap257$ kill 7495
delirium:~ ap257$ sudo su - postgres
Password:
delirium:~ postgres$ rm -rf /usr/local/pgsql/
[reinstall postgres from binaries]
delirium:~ ap257$ sudo su - postgres
Password:
delirium:~ postgres$ export PATH=$PATH:/usr/local/pgsql/bin/
delirium:~ postgres$ psql
Password:
psql (8.4.4)
Type "help" for help.
postgres=# \l
List of databases
Name | Owner | Encoding | Collation | Ctype | Access privileges
------------------+----------+----------+-----------+-------+-----------------------
osqa | postgres | UTF8 | C | C | =Tc/postgres
: postgres=CTc/postgres
: osqa=CTc/postgres
postgres | postgres | UTF8 | C | C |
production | postgres | UTF8 | C | C | =Tc/postgres
: postgres=CTc/postgres
: anna=CTc/postgres
template0 | postgres | UTF8 | C | C | =c/postgres
: postgres=CTc/postgres
template1 | postgres | UTF8 | C | C | =c/postgres
: postgres=CTc/postgres
template_postgis | postgres | UTF8 | C | C |
(6 rows)
postgres=# \q
delirium:~ postgres$ echo $PGDATA
Why won't these databases die?