Documentation

Delete a database

Use the Admin UI, the influxctl CLI, or the Management HTTP API to delete a database from your InfluxDB Cloud Dedicated cluster.

Deleting a database cannot be undone

Once a database is deleted, data stored in that database cannot be recovered.

Wait before writing to a new database with the same name

After deleting a database from your InfluxDB Cloud Dedicated 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.

The InfluxDB Cloud Dedicated administrative UI includes a portal for managing databases.

  1. To access the InfluxDB Cloud Dedicated Admin UI, visit the following URL in your browser:

  2. Use the credentials provided by InfluxData to log into the Admin UI. If you don’t have login credentials, contact InfluxData support.

  3. In the cluster list, find the cluster you want to create a database in. You can sort on column headers or use the Search field to find a specific cluster.

  4. Click the options button (three vertical dots) to the right of the token you want to revoke. The options menu displays.

  5. In the options menu, click Delete Database. The Delete Database dialog displays.

  6. In the Delete Database dialog, check the box to confirm that you “understand the risk of this action”.

  7. Click the Delete Database button to delete the database.

Create database dialog
  1. If you haven’t already, download and install the influxctl CLI, and then configure an influxctl connection profile for your cluster.

  2. In your terminal, run the influxctl database delete command and provide the following:

    • The name of the database to delete
  3. Confirm that you want to delete the database.

influxctl database delete 
DATABASE_NAME
  • Copy
  • Fill window

This example uses cURL to send a Management HTTP API request, but you can use any HTTP client.

  1. If you haven’t already, follow the instructions to install cURL for your system.

  2. In your terminal, use cURL to send a request to the following InfluxDB Cloud Dedicated endpoint:

    In the URL, provide the following:

    Provide the following request headers:

    Specify the DELETE request method.

The following example shows how to use the Management API to delete a database:

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
"
  • Copy
  • Fill window

Replace the following in your request:

  • ACCOUNT_ID: the ID of the InfluxDB Cloud Dedicated account to create the database for
  • CLUSTER_ID: the ID of the InfluxDB Cloud Dedicated cluster to create the database for
  • MANAGEMENT TOKEN: a management token for your InfluxDB Cloud Dedicated cluster
  • DATABASE_NAME: your InfluxDB Cloud Dedicated database

Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

Now Generally Available

InfluxDB 3 Core and Enterprise

Start fast. Scale faster.

Get the Updates

InfluxDB 3 Core is an open source, high-speed, recent-data engine that collects and processes data in real-time and persists it to local disk or object storage. InfluxDB 3 Enterprise builds on Core’s foundation, adding high availability, read replicas, enhanced security, and data compaction for faster queries and optimized storage. A free tier of InfluxDB 3 Enterprise is available for non-commercial at-home or hobbyist use.

For more information, check out: