This page documents an earlier version of InfluxDB. InfluxDB v2.7 is the latest stable version. View this page in the v2.7 documentation.
influx delete command deletes points
from an InfluxDB bucket in a specified time range.
Select points to delete within the specified time range using delete predicate syntax.
influx delete without the
--predicate flag deletes all data with timestamps between the specified
--stop times in the specified bucket.
|Flag||Description||Input type||Maps to ?|
|CLI configuration to use for command||string|
|Name of bucket to remove data from (mutually exclusive with ||string|
|Bucket ID (mutually exclusive with ||string|
|Path to ||string|
|Help for the |
|HTTP address of InfluxDB (default ||string|
|Inspect communication with InfluxDB servers.||string|
|Organization name (mutually exclusive with ||string|
|Organization ID (mutually exclusive with ||string|
|InfluxQL-like predicate string (see Delete predicate)||string|
|Skip TLS certificate verification|
|(Required) Start time in RFC3339 format (i.e. ||string|
|(Required) Stop time in RFC3339 format (i.e. ||string|
The examples below assume your InfluxDB host, organization, and token are
provided by either the active
influx CLI configuration or by environment variables (
If you do not have a CLI configuration set up or the environment variables set, include these required credentials for each command with the following flags:
--host: InfluxDB host
--org-id: InfluxDB organization name or ID
-t, --token: InfluxDB API token
- Delete all points in a measurement
- Delete points in a measurement with a specific tag value
- Delete all points within a specified time frame
Delete all points in a measurement
influx delete \ --bucket example-bucket \ --start 1970-01-01T00:00:00Z \ --stop $(date +"%Y-%m-%dT%H:%M:%SZ") \ --predicate '_measurement="example-measurement"'
Delete points in a measurement with a specific tag value
influx delete \ --bucket example-bucket \ --start 1970-01-01T00:00:00Z \ --stop $(date +"%Y-%m-%dT%H:%M:%SZ") \ --predicate '_measurement="example-measurement" AND host="old-host"'
Delete all points within a specified time frame
influx delete \ --bucket example-bucket \ --start 2020-03-01T00:00:00Z \ --stop 2020-11-14T00:00:00Z
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, use the following resources:
InfluxDB Cloud and InfluxDB Enterprise customers can contact InfluxData Support.