Delete predicate syntax

InfluxDB uses an InfluxQL-like predicate syntax to determine what data points to delete. InfluxDB uses the delete predicate to evaluate the series keys of points in the time range specified in the delete request. Points with series keys that evaluate to true for the given predicate are deleted. Points with series keys that evaluate to false are preserved.

A delete predicate is comprised of one or more predicate expressions. The left operand of the predicate expression is the column name. The right operand is the column value. Operands are compared using comparison operators. Use logical operators to combine two or more predicate expressions.

Example delete predicate
key1="value1" AND key2="value"

Predicates with special characters or keywords

If your predicate contains keywords or strings with special characters, wrap each in escaped quotes to ensure the predicate string is parsed correctly.

// Escaped due to the "-"

// Escaped because "name" is a keyword
"_measurement=example and \"name\"=predicate"

Column limitations when deleting data

InfluxDB 2.6 supports deleting data by any column or tag except the following:

  • _time
  • _field
  • _value

InfluxDB 2.6 does not support deleting data by field.

Logical operators

Logical operators join two or more predicate expressions.

ANDBoth left and right operands must be true for the expression to be true.

Comparison operators

Comparison operators compare left and right operands and return true or false.

=Equal to"abc"="abc"true

Delete predicate examples

Delete points by measurement

The following will delete points in the sensorData measurement:


Delete points by tag set

The following will delete points from the prod-1.4 host in the us-west region:

host="prod-1.4" AND region="us-west"


The delete predicate syntax has the following limitations.

  • Delete predicates do not support regular expressions.
  • Delete predicates do not support the OR logical operator.
  • Delete predicates only support equality (=), not inequality (!=).
  • Delete predicates can use any column or tag except _time , _field, or _value.

Was this page helpful?

Thank you for your feedback!

Set your InfluxDB URL

Linux Package Signing Key Rotation

All signed InfluxData Linux packages have been resigned with an updated key. If using Linux, you may need to update your package configuration to continue to download and verify InfluxData software packages.

For more information, see the Linux Package Signing Key Rotation blog post.

State of the InfluxDB Cloud (IOx) documentation

The new documentation for InfluxDB Cloud backed by InfluxDB IOx is a work in progress. We are adding new information and content almost daily. Thank you for your patience!

If there is specific information you’re looking for, please submit a documentation issue.