Deleting Loki log chunks from MinIO S3 Bucket

I’m using Loki with MinIO S3 object storage. Since Loki doesn’t support size-based retention, is deleting objects directly from MinIO acceptable? Would I need to recalculate the index after deleting S3 objects?

I came across this post, but he’s not recalculating the index after deleting objects.

Currently, I’m using the Loki HTTP delete endpoint but it’s a prolonged way of doing it.

It’s generally not recommended to delete files directly from object storage. I’d recommend setting up a time based retention policy.

You can manually delete chunk files if you really want to, you’ll just sometimes run into query errors because Loki still thinks the logs are there (because index is still present), but chunk files aren’t anymore.