Drop PostgreSQL Database
Purpose
This topic describes how to use the psql command to removes all the catalog entries and data directory permanently from the PostgreSQL environment.
Drop Database
Just run below command and change it with the database value.
WARNING : THIS COMMAND WILL DELETE DATABASE!
[root@gejoreuy ~]# dropdb -U username -h hostname -p port -i -e databasename
Note :
- username: The username that to be used to delete PostgreSQL database.
- hostname: The hostname of the PostgreSQL database.
- port: The port number of the PostgreSQL database.
- databasename: The PostgreSQL database name.