Retention in Grafana Loki through the table manager is done via the object store TTL feature. You can also setup retention through the Compactor which works only with the boltdb-shipper store. This requires more config for the Compactor. See Retention | Grafana Labs which contains an example of the retention configuration for the Compactor.