# Delete all measurement start with

**URL:** <https://community.influxdata.com/t/delete-all-measurement-start-with/33737>\
**Category:** InfluxDB 2\
**Tags:** influxdb\
**Created:** [March 28, 2024, 10:18pm UTC](https://community.influxdata.com/t/delete-all-measurement-start-with/33737 "2024-03-28T22:18:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![manustar](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/manustar/32/13220_2.png) [@manustar](https://community.influxdata.com/u/manustar)\
**Post date:** [March 28, 2024, 10:18pm UTC](https://community.influxdata.com/t/delete-all-measurement-start-with/33737/1 "2024-03-28T22:18:08Z")

</div>

It’s probably me who didn’t understand how to delete, but the problem is this, I want to delete all the measurements that begin with nh  
I launched the command `influx.exe delete --bucket homeassistant --start 1970-01-01T00:00:00Z -stop 2024-03-28T23:00:00Z --predicate "_measurement=nh"` and actually the data inside isn’t there, but I really want to remove it from view

![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/d/d7fc2eeb92660ba78a9e7c39d420de67b1a7a279.png)

---

<div class="post-metadata">

**Author:** ![scott](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/scott/32/16492_2.png) [@scott](https://community.influxdata.com/u/scott)\
**Post date:** [March 28, 2024, 11:28pm UTC](https://community.influxdata.com/t/delete-all-measurement-start-with/33737/2 "2024-03-28T23:28:42Z")

</div>

@manustar The delete predicate has to be an exact string match. Also, there’s some syntax errors in your command.

Run the following command for each measurement you want to delete:

```sh
influx.exe delete --bucket homeassistant --start 1970-01-01T00:00:00Z --stop 2024-03-28T23:00:00Z --predicate '_measurement="nh_btcusdc_rate"'

```

---

<div class="post-metadata">

**Author:** ![manustar](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/manustar/32/13220_2.png) [@manustar](https://community.influxdata.com/u/manustar)\
**Post date:** [March 29, 2024, 8:48am UTC](https://community.influxdata.com/t/delete-all-measurement-start-with/33737/3 "2024-03-29T08:48:56Z")

</div>

> [@scott](#):
>
> `influx.exe delete --bucket homeassistant --start 1970-01-01T00:00:00Z --stop 2024-03-28T23:00:00Z --predicate '_measurement="nh_btcusdc_rate"'`

I have already tried to delete individually, but the result is the same, it deletes the data but the metric remains

---

<div class="post-metadata">

**Author:** ![scott](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/scott/32/16492_2.png) [@scott](https://community.influxdata.com/u/scott)\
**Post date:** [April 1, 2024, 2:18pm UTC](https://community.influxdata.com/t/delete-all-measurement-start-with/33737/4 "2024-04-01T14:18:04Z")

</div>

> [@manustar](#):
>
> it deletes the data but the metric remains

I’m not sure what this means. Are you saying that `nh_btcusdc_rate` still appears when you list measurements? If that’s the case, it could be a few things:

- You need to hard refresh the Data Explorer. That list of is populated on load and doesn’t update unless you refresh.
- You may need to [rebuild your indexes](https://docs.influxdata.com/influxdb/v2/admin/internals/tsi/rebuild-index/) to reflect the delete measurement.
