Skip to main content

db:drop

Drop current database.

warning

This command will permanently delete the current database. Use with extreme caution, especially with the --force option, as it will drop the database without confirmation. Ensure you have backups before proceeding.

n98-magerun2.phar db:drop [options]

Options:

OptionDescription
--connection=CONNECTIONSelect DB connection type for Magento configurations with several databases
-t, --tablesDrop all tables instead of dropping the database
-f, --forceForce

Help:

The command prompts before dropping the database. If --force option is specified it directly drops the database. The configured user in app/etc/env.php must have "DROP" privileges.