How to delete all databases on Postgres?
You can do "drop cluster" and "create cluster" which will automtically erase all databases. Erase all data in you $PGDATA directory and reinit the cluster using:
initdb -D /usr/local/pgsql/data
You can use:
$ pg_dropcluster 9.2 main
$ pg_createcluster 9.2 main
$ pg_ctlcluster 9.2 main start
$ pg_restore -f your_dump_file
where 9.2
= cluster version
and main
= cluster name