If the database user is www-data
, and the database is database
, then you can do this:
$ sudo -u www-data dropdb database
More about the dropdb
utility and the DROP DATABASE command.
Answer 1, authority 100%
From psql client:
postgres = # drop database database_name;