Recorder / History Sensor logging and deletion

Hi,

I am trying to use either the recorder or history integrations to limit the amount of data for several sensors.

I want to limit the data recorder by sensor.example for 48 hours only. Data older than 48 hours should be deleted.

Any ideas?

Thanks.