I use InfluxDB Cloud and have four test entries in my measurements ‘table’ called grid_meter_readings. Now I want to delete all entries from that measurement.
This is how I tried to do it via the CLI:
influx delete --bucket site --start '2020-01-01T00:00:00Z' --stop '2025-01-01T00:00:00Z' --predicate '_measurement="grid_meter_readings"'
I don’t get any feedback from the CLI in the Terminal, it just executes without feedback. However, the measurements don’t get deleted.
I tried to modify the command like misspelling the bucket which results in an error. So I assume my original command is correct.
It’s frustrating that the CLI doesn’t give feedback what is wrong or what has happend during execution.
How can I delete every measurement with name grid_meter_readings? Can I do that also in the web Data Explorer?
Some more information:
% influx version
Influx CLI 2.7.5 (git: a79a2a1b82) build_date: 2024-04-16T14:32:10Z
Hello @NNNN,
How are you verifying the delete?
Sometimes there are shard issues and caching issues with the UI that cause a delay. Are you still not seeing the bucket deleted? If you don’t get an error message it should have been deleted successfully.
I’m also not sure that you can use regex to delete all measurements containing the name grid_meter_readings. But rather explicitly defined measurements passed to the predicate flag.
Here are the limitations:
If you don’t get an error message it should have been deleted successfully.
That’s not matching my experience. If I change my command to something not matching any measurement to something like
influx delete --bucket site --start '2020-01-01T00:00:00Z' --stop '2025-01-01T00:00:00Z' --predicate '_measurement="SOMETHING_MADE_UP"'
then the CLI command executes the same way, meaning I don’t get any error but at the same time also no positive feedback, like it affected 0, 10, or 10 000 rows.
Hello @NNNN,
I’m not sure why the delete is working for you sometimes and not other times. I agree the lack of positive feedback is not good. Would you mind creating an issue and feature request here?
Thank you. I’m sorry I can’t be of more help. Maybe try reinstalling the CLI?
Or you could also try a delete with the API:
The error messages and feedback will be stronger with the API at least.