Hi,
You have to manage your retentions at the source prometheus/influx.
Please check this thread :
Hope it helps.
Good Luck