PostgreSQL 18 · Databases and roles

Drop a database

Delete a database and everything in it.

dropdb -U postgres mydb

Caution: This permanently deletes the database. Take a backup first.

Official PostgreSQL 18 documentation

More databases and roles commands

All databases and roles commands · PostgreSQL 18 cheatsheet

Was this page helpful?