>_ linuxcommand.dev
Startseite dropdb
Database

dropdb

Removes PostgreSQL databases via CLI

Syntax
$dropdb [options] dbname
Optionen
-U
-i
--if-exists
-h
Examples
Examples
$dropdb mydb
Examples
$dropdb -U postgres --if-exists mydb
Examples
$dropdb -i old_test_db
Warnings
Deletes the database permanently
Typical use cases
Remove test databases
Cleanup in CI pipelines
Manage database lifecycle
Note Wrapper around SQL DROP DATABASE; useful for test environment cleanup.
Export