Reputation: 3104
I know DROP MEASUREMENT measurement_name
used to drop single measurement. How to delete all measurements at once ?
Upvotes: 45
Views: 97298
Reputation: 11
clear bucket in command line: influx delete --bucket 'mybucket' --org 'myorg' --start 1970-01-01T00:00:00Z --stop $(date +"%Y-%m-%dT%H:%M:%SZ")
Upvotes: 1
Reputation: 85
The way to delete all entries of one MEASUREMENT is
DELETE FROM MEASUREMENT_NAME
Upvotes: 0
Reputation: 8109
For those who are looking to use WHERE
clause with DROP SERIES
, here it is:
DROP SERIES FROM /.*/ WHERE "your-tag" = 'tag-value-to-delete-data'
Please notice the quotation marks on after the WHERE
clause, they should be like this for DROP SERIES
; as of InfluxDB v.1.3
.
Else, you might get error like ERR: invalid expression: ...
Upvotes: 7
Reputation: 4747
Theres no way to drop all of the measurements directly, but the query below will achieve the same result.
DROP SERIES FROM /.*/
Upvotes: 92