Skip to main content

DROP SECRET

The DuckDB DROP SECRET statement (see DuckDB DROP SECRET documentation) works in MotherDuck to delete the secret previously created with CREATE SECRET statement.

Syntax

DROP SECRET <secret_name>;

When there are multiple secrets with the same name stored in different secret storages (e.g. in memory vs. in MotherDuck), either the persistent type or the secret storage type needs to be specified to remove ambiguity when dropping the secret.

Example Usage

Disambiguate by specifying the storage type when dropping a secret:

DROP SECRET __default_s3 FROM motherduck;

Disambiguate by specifying the persistence type when dropping a secret:

DROP PERSISTENT SECRET __default_s3;