How to delete a tag from InfluxDB 2.1

I’m using Telegraf to pull metrics into InfluxDB, at some point I changed the hostname of one of the boxes Telegraf is monitoring and I wanted to purge all the data from before the hostname change and purge the old host tag too so it doesn’t show up anymore.

I think I’ve successfully deleted all the data points as I see no data in the web UI any more, using:

influx delete --bucket mybucket --start '1970-01-01T00:00:00Z' --stop $(date +"%Y-%m-%dT%H:%M:%SZ") --predicate 'host="oldhostname"'

However despite the web UI saying “No Results”, it’s still finding the “oldhostname” tag and so showing it as available for filtering by “host”. I can’t work out, now that all the data linked to that tag is gone, how to delete the tag itself. I can’t find anything in any of the docs how to delete old tags and Google is drawing blanks.

Any suggestions?

Hello @js_pex,
Are you using InfluxDB Cloud or OSS?
Is this problem persisting?

Hey, yes this is still persisting. I’m using InfluxDB OSS.

This is still an issue. I wanted to created a tag named “main”, but due to an error I created tags named “m”, “a” and “i” - before my python loop got exhausted and made an exception. Only one point of each was created and I removed them from the bucket, but whenever I have a range spanning over those points - I can see them as valid tags.

I think I ran OSS 2.2 at that time and now I’m running OSS 2.4 - fortunately time has gone, and ranges are seldom covering the points anymore.

OSS v2.7.5 It continues to be a problem. The tag is never deleted.

this problem exists on 2.7.8 oss, 2 years and nothing.