rajagopalx
rajagopalx

Reputation: 3104

In Influxdb, How to delete all measurements?

I know DROP MEASUREMENT measurement_name used to drop single measurement. How to delete all measurements at once ?

Upvotes: 45

Views: 97298

Answers (5)

Serwer G-ka
Serwer G-ka

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

angie866
angie866

Reputation: 85

The way to delete all entries of one MEASUREMENT is

DELETE FROM MEASUREMENT_NAME

Upvotes: 0

ehsan latif
ehsan latif

Reputation: 7

use "DELETE Measurement" from InfluxDB admin Panel

Upvotes: -2

kmonsoor
kmonsoor

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

Michael Desa
Michael Desa

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

Related Questions