Commands.app

dropdb

Database Management

Remove a PostgreSQL database

Options & Flags
Available options for this command
-i

Prompt before deleting

--if-exists

Don't error if database doesn't exist

Examples
Common usage examples

Drop database named myapp

dropdb myapp

Drop with confirmation prompt

dropdb -i myapp

Drop only if exists

dropdb --if-exists myapp
Notes
  • Cannot drop a database you are connected to
  • This action is irreversible
Related Commands
You might also find these useful