Delete data
InfluxDB 2.2 supports deleting data by the following:
- time range
- measurement ()
- tag
InfluxDB 2.2 does not support deleting data by field.
Once a delete request completes successfully, the deleted data is no longer queryable, but will remain on disk until the compaction service runs.
Use InfluxDB CLI connection configurations to provide your InfluxDB host, organization, and API token.
Use the to delete points from InfluxDB.
Use the
--start
and--stop
flags to define the time range to delete data from. Use RFC3339 timestamps.(Optional) Use the ,
--predicate
flag to include a that identifies which points to delete.Deleting data without a delete predicate deletes all data in the specified bucket with timestamps between the specified
start
andstop
times.
Delete points in a specific measurement with a specific tag value
Delete all points in a specified time range
Delete data using the API
Use the InfluxDB API /api/v2/delete endpoint to delete points from InfluxDB.
Include the following:
- Request method:
- Query parameters:
- org or orgID: organization name or
- bucket or bucketID: bucket name or bucket ID
-
* start: earliest time to delete data from ()
* stop: latest time to delete data from (RFC3339)
predicate: statement
Deleting data without a delete predicate deletes all data in the specified bucket with timestamps between the specified
start
and times.
Examples
Delete points in a specific measurement with a specific tag value
Delete all points in a specified time range
For more information, see the /api/v2/delete endpoint documentation.