# Delete data from the bucket

**URL:** <https://community.influxdata.com/t/delete-data-from-the-bucket/16909>\
**Category:** InfluxDB 2\
**Created:** [November 25, 2020, 7:27am UTC](https://community.influxdata.com/t/delete-data-from-the-bucket/16909 "2020-11-25T07:27:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vshaev](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/vshaev/32/1222_2.png) [@vshaev](https://community.influxdata.com/u/vshaev)\
**Post date:** [November 25, 2020, 7:27am UTC](https://community.influxdata.com/t/delete-data-from-the-bucket/16909/1 "2020-11-25T07:27:17Z")

</div>

I cannot delete data from the bucket. I use the instructions [Delete data | InfluxDB OSS 2.0 Documentation](https://docs.influxdata.com/influxdb/v2.0/write-data/delete-data/).  
Error: unknown shorthand flag: ‘b’ in -b,  
The output of the “influx delete -h” command does not contain the -b ???  
`Flags:
-c, --active-config string Config name to use for command; Maps to env var $INFLUX_ACTIVE_CONFIG
–bucket string The name of destination bucket; Maps to env var $INFLUX_BUCKET_NAME
–bucket-id string The ID of the destination bucket; Maps to env var $INFLUX_BUCKET_ID
–configs-path string Path to the influx CLI configurations; Maps to env var $INFLUX_CONFIGS_PATH (default “/root/.influxdbv2/configs”)
-h, --help Help for the delete command
–host string HTTP address of InfluxDB; Maps to env var $INFLUX_HOST
-o, --org string The name of the organization that owns the bucket; Maps to env var $INFLUX_ORG
–org-id string The ID of the organization that owns the bucket; Maps to env var $INFLUX_ORG_ID
-p, --predicate string sql like predicate string, exp ‘tag1=“v1” and (tag2=123)’
–skip-verify Skip TLS certificate chain and host name verification.
–start string the start time in RFC3339Nano format, exp 2009-01-02T23:00:00Z
–stop string the stop time in RFC3339Nano format, exp 2009-01-02T23:00:00Z
-t, --token string Authentication token; Maps to env var $INFLUX_TOKEN`

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [December 2, 2020, 7:16pm UTC](https://community.influxdata.com/t/delete-data-from-the-bucket/16909/2 "2020-12-02T19:16:49Z")

</div>

Hello @vshaev,  
Can you please share your entire command?  
Looking at [the API documentation](https://docs.influxdata.com/influxdb/v2.0/api/#operation/PostDelete) indicates that a bucket is needed. However, can you try using `-bucket` and `-bucket-id`?

Thank you

---

<div class="post-metadata">

**Author:** ![vshaev](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/vshaev/32/1222_2.png) [@vshaev](https://community.influxdata.com/u/vshaev)\
**Post date:** [December 3, 2020, 5:58am UTC](https://community.influxdata.com/t/delete-data-from-the-bucket/16909/3 "2020-12-03T05:58:53Z")

</div>

I am trying to use CLI - “influx delete --org myOrg --bucket mybucket --start ‘1970-01-01T00:00:00.00Z’ --stop ‘2020-01-01T00:00:00.00Z’ --token myToken”  
Error: Failed to delete data: Not implemented.

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [December 3, 2020, 5:30pm UTC](https://community.influxdata.com/t/delete-data-from-the-bucket/16909/4 "2020-12-03T17:30:02Z")

</div>

@vshaev,  
Is your token an all access token?

---

<div class="post-metadata">

**Author:** ![dan-moran](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/dan-moran/32/5885_2.png) [@dan-moran](https://community.influxdata.com/u/dan-moran)\
**Post date:** [December 3, 2020, 6:06pm UTC](https://community.influxdata.com/t/delete-data-from-the-bucket/16909/5 "2020-12-03T18:06:17Z")

</div>

Hi @vshaev, the API used by that CLI command isn’t supported yet. We just merged the implementation, it’ll be included in the 2.0.3 release.

---

<div class="post-metadata">

**Author:** ![dcaho](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@dcaho](https://community.influxdata.com/u/dcaho)\
**Post date:** [January 4, 2021, 4:47pm UTC](https://community.influxdata.com/t/delete-data-from-the-bucket/16909/6 "2021-01-04T16:47:39Z")

</div>

Running 2.0.3 database and CLI.

I am having exactly the same problem being described. My CLI influx delete command is very similar, but I am using the predicate ‘\_field=“outdoor” AND \_measurement=“temperature”’.

Has the fix described truly built into 2.0.3 and are there still issues with the predicate?

Thanks

---

<div class="post-metadata">

**Author:** ![dan-moran](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/dan-moran/32/5885_2.png) [@dan-moran](https://community.influxdata.com/u/dan-moran)\
**Post date:** [January 4, 2021, 5:01pm UTC](https://community.influxdata.com/t/delete-data-from-the-bucket/16909/7 "2021-01-04T17:01:53Z")

</div>

Hi @dcaho, delete-with-predicate was shipped with v2.0.3, but we recently discovered that using \_field within the predicates doesn’t work. You can track progress towards the fix on this issue: [InfluxDB delete with predicate works for \_measurement, but not for specific \_field · Issue #20399 · influxdata/influxdb · GitHub](https://github.com/influxdata/influxdb/issues/20399)
