Keep data for X days only

I have a demo computer with limited storage. Therefore I need to delete all indexed data older than 7 days or 5 GB.

How would a life cycle policy look like to fulfill that need?

Thank you very much for your support!

You'd set the delete phase to remove indices after 5 days.

ILM can as far as I know not be configured to delete based in total data volume or index count so I am not sure what you are looking for is possible. Curator can however trigger delete based on total data size so may work for this scenario.