Can´t delete last Data Set (InfluxDB 2.6)

Hi,

i can´t delete the last Data Set:

influx delete --bucket "test" --org "myorg" --predicate '_measurement="test"' --start "2022-12-23T14:27:23.168Z" --stop "2022-12-23T14:27:23.168Z" --token "mytoken"

Hello @Starfoxfs,
what version are you using?
Did you get any errors when executing that command?
Can you please verify that your names don’t have any whitespaces?

Can you also please try changing to:
--start "2022-12-23T14:27:23.16Z"

Now it works, i don´t know why, also with nanoseconds Timestamps.

I have rebooted my Device.

InfluxDB V2.6 (latest)

What definitely doesn’t work is delete with _field and _value as shown in the manuals.

https://docs.influxdata.com/influxdb/v2.6/write-data/delete-data/

Here i have tested any Timestamp from milliseconds, nanoseconds, and seconds.

Sorry for bringing this up again, but I can’t delete data as well. Whatever I do, nothing works and I never receive any feedback from the system, hence I have no idea what is wrong

This is how my cli command looks like

influx delete --bucket MYDATABASENAME --start ‘2023-01-21T14:12:06.16Z’ --stop ‘2023-01-21T14:51:20.16Z’ --predicate ‘_measurement=“GasZaehlerStandAktuell”’ -o BCO -t MYADMINTOKEN

I have experimented with the timestamps, the apostrophes and the sequence of the commands. Absolutely nothing works.

I am on Influx 2.6.1 running within a LXC container. Strange enough, the exact same command worked for me 2 weeks ago… not that I am aware of any update of the DB since then.

Any ideas would be greatly appreciated

Try this:

influx delete --bucket "mydatabase" --org "myorg" --predicate '_measurement="mymeasurement"' --start "1970-01-01T00:00:00Z" --stop "2025-12-31T23:59:00Z" --token "Myadmintoken"

with your values, i hope this helps

Thanks for your reply, but what what is different to my post? The syntax is exactly the same?
The sequence of the parameters as well as using them fully or just the initials makes no difference. The time can be stated with or without nanoseconds (took this idea from annother post where it worked), so what am I missing ?

Hi,

not exactly you have -o and -t for org and token

I have --org and --token

In my case -o and -t didn´t work with newer InfluxDB

Are there some Error Messages with your CLI Code ?

I see, but as I wrote, using the initials or the full word did not make any difference here. Testet that a couple of times.

Unfortunately with that syntax, no error is thrown at all. Only if something is clearly wrong, like missing token or missing org, then it returns a readable error.

Do you have the original Admin Token ? or is it a new created one ?

In some cases only the original Admin Token works (This one from first install InfluxDB).

e.g. for Backups

Try to create another new Admin Token and Configure it for CLI with this command:

influx config create --config-name <config-name> \
  --host-url http://localhost:8086 \
  --org <your-org> \
  --token <your-auth-token> \
  --active

It is the original one. I testet the command with a different one, which then threw some error message about wrong credentials. So the exact same command with the exact same credentials worked up and until now 3 weeks ago or so…

Hmm, then I don’t know the answer, but I’m also just a user, I hope a developer can help you.

Thanks anyways ! Appreciated the effort :slight_smile: