Deleting Data in InfluxDB2 does not work

I want to delete two measurements in a bucket. But all i have tried, nothing works.
InfluxDB v2.6.1 is running on an RASPI.

Yes, i’ve read the docu on :wink:

The selection of the bucket in the “Data Explorer” delivers this table

So the relevant dates are “2023-02-09T20:16:00.000Z” and “2023-02-09T20:20:00.000Z”.

Then i build these two stmts with ±1 minute:
influx delete --bucket Zaehlerstaende --start 2023-02-09T20:15:00.000Z --stop 2023-02-09T20:17:00.000Z
influx delete --bucket Zaehlerstaende --start 2023-02-09T20:15:00.000Z --stop 2023-02-09T20:17:00.000Z

Looks good: No error occurs. But the values were not deleted afterwards.
I’ve tried it with a “–token …” and “” with no change.

Any ideas?

quick guess. It seems that Zaehlerstand is your _measurment name, not your bucket name. You can get the bucket name with influx bucket list

influx delete --bucket <insertBucketNameHere>--start 2023-02-09T20:15:00.000Z --stop 2023-02-09T20:17:00.000Z --predicate '_measurement="Zaehlerstand"'

Good idea and thanks for your suggestion.

But the Name of the Bucket was correct: “Zaehlerstaende”.
Measurement: “Zaehlerstand”.

I tried to delete all data within the time - without the predicate - but this did not work, too.

I found this thread because I have exactly the same issue.

ii influxdb2 2.6.1-1 arm64 Distributed time-series database.
ii influxdb2-cli 2.6.1 arm64 CLI for managing resources in InfluxDB v2


influx delete --start '2023-02-10T23:59:01Z' --stop '2023-02-11T00:30:00Z' --org <orgname> --bucket solar

Even this very crude delete statement that would wipe all data within the bucket “solar” doesn’t work and no return code or error message is shown.

ok so maybe it is a 2.6.1. issue. I run daily queries like the one above in 2.1.1 and I am not updating for now due to other issues.

Hi I am also having the same issue on V2.6.1.
First I ingested CSV data from the CLI, All good.

then I deleted the data using this command: influx delete --bucket webbreaks --start 2023-02-27T10:05:24Z --stop 2023-02-27T11:05:25Z , (“webbreaks” is my bucket) The Problem: is that once I deleted the data I still see this
And I cannot ingest data again. As a summary, it looks like the command is deleting the data but not completely. I have tried repeating the ingestion process but just get the empty headers, Meaning that I cannot longer ingest CSV data from files. @Anaisdg could you maybe point us to someone on your team who can give us more input on this please? :slight_smile:

Same for me…

I found a solution :slight_smile:

First I had to disable “mean” in the Data Explorer to get the real date in UTC. “Mean” is enabled automatically.
In addition, the token was missing in the statement.

The relevant time was: 2023-02-09 20:17:01 UTC
So I came to the following statement

influx delete --bucket "BUCKETNAME" --token "TOKEN" --start 2023-02-09T20:16:00.000Z --stop 2023-02-09T20:18:00.000Z

Only with the this combination the data was finally deleted.
It is annoying that you don’t get any feedback how many records were deleted or you just didn’t get access. This could be solved much better!

After all data is deleted during this time, I will test it next time with
--predicate '_field="FIELD"'