Drop a Database
Source: R/utils-db.R
Drops a database from the current DuckDB or MotherDuck connection if it exists. Prints a CLI status report after performing the operation.
Usage
delete_database(.con, database_name)Arguments
Value
Invisibly returns NULL. Side effect: drops the database and prints CLI status messages.
Details
-
Executes
DROP DATABASE IF EXISTS <database_name>to remove the database. -
Intended for DuckDB or MotherDuck connections.
-
Prints user, database and action details using CLI helper functions.
See Also
Other db-manage: alter_table_schema(), copy_tables_to_new_location(), create_database(), create_if_not_exists_share(), create_or_replace_share(), create_schema(), create_table(), delete_and_create_schema(), delete_schema(), delete_table(), describe_share(), drop_share(), list_owned_shares(), list_shared_with_me_shares(), upload_database_to_md()