DROPDB(1) PostgreSQL 18.6 Documentation DROPDB(1) (NAME) dropdb - PostgreSQL (SYNOPSIS) dropdb [connection-option...] [option...] dbname (DESCRIPTION) dropdb PostgreSQL . (superuser) . dropdb (wrapper) SQL DROP DATABASE . . (OPTIONS) dropdb : dbname . -e --echo dropdb . -f --force . DROP DATABASE (DROP_DATABASE(7)) . -i --interactive . -V --version dropdb . --if-exists . (notice) . -? --help dropdb . dropdb : -h host --host=host . (Unix domain socket) . -p port --port=port TCP . -U username --username=username . -w --no-password . .pgpass . (batch jobs) . -W --password dropdb . dropdb . dropdb . -W . --maintenance-db=dbname . postgres ( ) template1 . (connection string) . . (ENVIRONMENT) PGHOST PGPORT PGUSER PG_COLOR . always auto never. PostgreSQL libpq ( 32.15 ). (DIAGNOSTICS) DROP DATABASE (DROP_DATABASE(7)) psql(1) . . libpq . (EXAMPLES) demo : $ dropdb demo demo eden 5000 : $ dropdb -p 5000 -h eden -i -e demo Database "demo" will be permanently deleted. Are you sure? (y/n) y DROP DATABASE demo; (SEE ALSO) createdb(1), DROP DATABASE (DROP_DATABASE(7)) PostgreSQL 18.6 2026 DROPDB(1)