InfluxQL/Flux query to drop old pod series?

We have currently 7 million series in a single influxdb 1.7.2 feeded with Prometheus metrics from a big k8s cluster.

We would like remove old pods data , this is , all series not updated from more than N days. ( by example)

how we can do this with a InfluxQL query? or perhaps better with flux?

Thank you very much