content/influxdb3/cloud-dedicated/admin/databases/delete.md
Use the Admin UI, the influxctl CLI,
or the Management HTTP API
to delete a database from your {{< product-name omit=" Clustered" >}} cluster.
[!Warning]
Wait before writing to a new database with the same name
After deleting a database from your {{% product-name omit=" Clustered" %}} cluster, you can reuse the name to create a new database, but wait two to three minutes after deleting the previous database before writing to the new database to allow write caches to clear.
Tokens still grant access to databases with the same name
Database tokens are associated to databases by name. If you create a new database with the same name, tokens that granted access to the deleted database will also grant access to the new database.
[!Note]
Deleted databases may be able to be restored
Deleted databases may be able to be restored within approximately 7 days of deletion, depending on when cleanup jobs run. After the cleanup job runs, the database and its data are permanently removed.
{{< tabs-wrapper >}} {{% tabs %}} Admin UI influxctl Management API {{% /tabs %}} {{% tab-content %}}
<!------------------------------- BEGIN ADMIN UI ------------------------------>The InfluxDB Cloud Dedicated administrative UI includes a portal for managing databases.
To access the {{< product-name >}} Admin UI, visit the following URL in your browser:
<pre> <a href="https://console.influxdata.com">https://console.influxdata.com</a> </pre>Use the credentials provided by InfluxData to log into the Admin UI. If you don't have login credentials, contact InfluxData support.
In the database list, find the database you want to delete. You can sort on column headers or use the Search field to find a specific database.
Click the options button (three vertical dots) to the right of the database you want to delete. The options menu displays.
In the options menu, click Delete Database. The Delete Database dialog displays.
In the Delete Database dialog, check the box to confirm that you "understand the risk of this action".
In the Enter Database Name to Delete field, type the name of the database to confirm deletion.
Click the Delete Database button to delete the database.
{{< img-hd src="/img/influxdb3/cloud-dedicated-admin-ui-delete-database.png" alt="Create database dialog" />}} {{% /tab-content %}} {{% tab-content %}}
<!------------------------------- BEGIN INFLUXCTL ----------------------------->If you haven't already,
download and install the influxctl CLI, and then configure an influxctl connection profile
for your cluster.
In your terminal, run the influxctl database delete command and provide the following:
Confirm that you want to delete the database.
{{% code-placeholders "DATABASE_NAME" %}}
influxctl database delete DATABASE_NAME
{{% /code-placeholders %}}
<!-------------------------------- END INFLUXCTL ------------------------------>{{% /tab-content %}} {{% tab-content %}}
<!------------------------------- BEGIN cURL ---------------------------------->This example uses cURL to send a Management HTTP API request, but you can use any HTTP client.
If you haven't already, follow the instructions to install cURL for your system.
In your terminal, use cURL to send a request to the following {{% product-name %}} endpoint:
{{% api-endpoint endpoint="https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases/DATABASE_NAME" method="delete" api-ref="/influxdb3/cloud-dedicated/api/management/#operation/DeleteClusterDatabase" %}}
In the URL, provide the following:
ACCOUNT_ID: The ID of the account
that the cluster belongs to (see how to list cluster details).CLUSTER_ID: The ID of the cluster
that you want to manage (see how to list cluster details).DATABASE_NAME: The name of the database
that you want to delete (see how to list databases).Provide the following request headers:
Accept: application/json to ensure the response body is JSON contentAuthorization: Bearer and a Management API token for your cluster (see how to create a management token for Management API requests).Specify the DELETE request method.
The following example shows how to use the Management API to delete a database:
{{% code-placeholders "DATABASE_NAME|ACCOUNT_ID|CLUSTER_ID|MANAGEMENT_TOKEN" %}}
curl \
--location "https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases/DATABASE_NAME" \
--request DELETE \
--header "Accept: application/json" \
--header "Authorization: Bearer MANAGEMENT_TOKEN"
{{% /code-placeholders %}}
Replace the following in your request:
ACCOUNT_ID{{% /code-placeholder-key %}}: the ID of the {{% product-name %}} account to create the database forCLUSTER_ID{{% /code-placeholder-key %}}: the ID of the {{% product-name %}} cluster to create the database forMANAGEMENT TOKEN{{% /code-placeholder-key %}}: a management token for your {{% product-name %}} clusterDATABASE_NAME{{% /code-placeholder-key %}}: your {{% product-name %}} database{{% /tab-content %}} {{< /tabs-wrapper >}}