Database
dropdb
Removes PostgreSQL databases via CLI
Ubuntu
CentOS
Debian
SUSE
Fedora
RHEL
Verified: 2026-05-13
Syntax
$dropdb [options] dbname
Optionen
-U
-i
--if-exists
-h
Examples
$dropdb mydb
$dropdb -U postgres --if-exists mydb
$dropdb -i old_test_db
See also
Typical use cases
?
Standard usage
dropdb --help
Note
Wrapper around SQL DROP DATABASE; useful for test environment cleanup.
Export