xDrip » Features » Glucose Retention
This setting can be found under Settings −> Less common settings.
By default, it is set to 180, which means data older than 180 days (about 6 months) is automatically deleted.
If you enter a non-zero value, xDrip will delete data older than that number of days on a daily basis.
You can retain all data by setting the value to 0. However, this is not recommended. It is best to upload your data to Nightscout or Tidepool for long-term storage.