TRUNCATE like command?

Hey guys,

Somewhat new to influxdb and I was wondering is there a TRUNCATE like command at all? I have an influxdb I want to truncate and completely reset to an empty state on a deployment of some new code.
Only way I can see to make this happen is via a drop and create however this causes issues with the app’s current codebase.


I am not aware of any. But does not mean a thing because I am new here :wink:

What I currently use is “DELETE FROM [MEASUREMENT_NAME]”
You should know all measurements you use. Otherwise a “SHOW MEASUREMENTS” will tell you.

Best regards

Hello @lukekhamilton,
Thank you for your question. You can drop a database or delete a series. Since InfluxDB is an append-only DB, it doesn’t have as many management commands as SQL. Please take a look at the InfluxDB docs here.