# Deleting measurements with corrupted/"non printable characters" names

**URL:** <https://community.influxdata.com/t/deleting-measurements-with-corrupted-non-printable-characters-names/21833>\
**Category:** InfluxDB 1\
**Created:** [September 23, 2021, 1:24pm UTC](https://community.influxdata.com/t/deleting-measurements-with-corrupted-non-printable-characters-names/21833 "2021-09-23T13:24:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgrammen-agilitypr](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jgrammen-agilitypr](https://community.influxdata.com/u/jgrammen-agilitypr)\
**Post date:** [September 23, 2021, 1:24pm UTC](https://community.influxdata.com/t/deleting-measurements-with-corrupted-non-printable-characters-names/21833/1 "2021-09-23T13:24:46Z")

</div>

Hello,

I have an issue similar to:  
similar issue to : [Corrupted Measurement](https://community.influxdata.com/t/corrupted-measurement/13264)

I have a bunch of old measurements with bad / corrupted names, and i cannot figure out how to delete them. various attempts via cli and curl have failed

example of bad/ corrupted names

```auto
�F@��@01
�F@��@vlentapptest01
�F@��@vlgraylogweb01
�F@��@vlrenderdbpp01
�u@mory
��@x@vlrenderdbpp01
��@twork
��@twork
��@ppet_agent

```

I tried the msgpack query, but i cannot figure out how to actually issue the drop measurement command. Cut and paste from the msgpack output doesnt work.

Is there any way to actually drop these measurments?

---

<div class="post-metadata">

**Author:** ![philb](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/philb/32/1805_2.png) [@philb](https://community.influxdata.com/u/philb)\
**Post date:** [September 23, 2021, 3:47pm UTC](https://community.influxdata.com/t/deleting-measurements-with-corrupted-non-printable-characters-names/21833/2 "2021-09-23T15:47:21Z")

</div>

I think you’ll need to run CURL once you have the real measurement names.

something like

`curl -u username -p password -XPOST 'http://influxDB_host:8086/query?db=your_db' --data-urlencode 'q= drop measurement "your_measurement"'`

replace “your\_measurement” with the measurement name you get from msgpack.

I’m not 100% on the influx API i tend to do most things in the CLI, but [here’s some API docs](https://docs.influxdata.com/influxdb/v1.8/tools/api/#influxdb-1-x-http-endpoints) that might help you structure the request how you want it.

The other option, as mentioned in the link you posted. Let the measurements age out through the retention policy. You’d need to create some new measurements for fresh data, then the old measurements will be dropped when the RP kicks in.

PS: careful copy and pasting, sometimes the forum changes the formatting of single and double quotes which causes problems.

---

<div class="post-metadata">

**Author:** ![jgrammen-agilitypr](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jgrammen-agilitypr](https://community.influxdata.com/u/jgrammen-agilitypr)\
**Post date:** [September 23, 2021, 5:24pm UTC](https://community.influxdata.com/t/deleting-measurements-with-corrupted-non-printable-characters-names/21833/3 "2021-09-23T17:24:40Z")

</div>

ran the following to get the msgpack output

```auto
curl 'localhost:8086/query?db=icinga2' --data-urlencode 'q=show measurements limit 1' -H 'Accept: application/x-msgpack' >tmp

```

cut and paste from the msgpack output into the next command (not positive i cut and pasted correctly)

```auto
curl -XPOST 'localhost:8086/query?db=icinga2' --data-urlencode 'q= drop measurment "^A@V^?^@^@twork"'

```

output

```auto
{"results":[{"statement_id":0}]}

```

and measurement is still present when using

```auto
use icinga2
show measurements

```

Am i cutting and pasting wrong? is the data getting encoded incorrectly?

---

<div class="post-metadata">

**Author:** ![philb](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/philb/32/1805_2.png) [@philb](https://community.influxdata.com/u/philb)\
**Post date:** [September 24, 2021, 8:21am UTC](https://community.influxdata.com/t/deleting-measurements-with-corrupted-non-printable-characters-names/21833/4 "2021-09-24T08:21:24Z")

</div>

> [@jgrammen-agilitypr](#):
>
> `^A@V^?^@^@twork`

Is that the output you get? I was expecting it to give the actual measurement name. But, assuming that should be network you could just update the second query to drop “network” instead of “^A@V^?^@^@twork”

Whats the actual output from the x-msgpack query?

---

<div class="post-metadata">

**Author:** ![jgrammen-agilitypr](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jgrammen-agilitypr](https://community.influxdata.com/u/jgrammen-agilitypr)\
**Post date:** [September 24, 2021, 11:12am UTC](https://community.influxdata.com/t/deleting-measurements-with-corrupted-non-printable-characters-names/21833/5 "2021-09-24T11:12:09Z")

</div>

Here is the message pack output in both text and image form (in case something gets mangled.)

```auto
<81>§results<91><82>¬statement_id^@¦series<91><83>¤name¬measurements§columns<91>¤name¦values<91><91>­^P<88>^A@V^?^@^@twork

```

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

---

<div class="post-metadata">

**Author:** ![jgrammen-agilitypr](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jgrammen-agilitypr](https://community.influxdata.com/u/jgrammen-agilitypr)\
**Post date:** [September 24, 2021, 11:14am UTC](https://community.influxdata.com/t/deleting-measurements-with-corrupted-non-printable-characters-names/21833/6 "2021-09-24T11:14:30Z")

</div>

and the output from influx cli of `show measurements`

```auto
InfluxDB shell version: 1.8.9
> use icinga2
Using database icinga2
> show measurements
name: measurements
name
----
�@twork
�@name=mm02mercurypp24
�@mory
�@ppet_agent
@@me=mm02compute04
0}@mory
0�@ppet_agent
0�@��@servicedbpp01
@s@ocs

```

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

---

<div class="post-metadata">

**Author:** ![jgrammen-agilitypr](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jgrammen-agilitypr](https://community.influxdata.com/u/jgrammen-agilitypr)\
**Post date:** [October 5, 2021, 6:07pm UTC](https://community.influxdata.com/t/deleting-measurements-with-corrupted-non-printable-characters-names/21833/7 "2021-10-05T18:07:11Z")

</div>

anyone have any other ideas on how to remove these “corrupted” measurements?
