Hello Hatim,
Thanks for reaching out.
You can delete old indices using Dev Tools. To list the indices you have using Dev Tools, run command
GET _cat/indices?v . This will list the indices you have. From there you can now delete the old indices of your choice, run
DELETE /<indices_to_delete>. For example
DELETE /wazuh-alerts-4.x-2024.04.21.
If you want to delete indices for a whole month, let's say for the month of April, you can use the wildcard(*). For example,
DELETE /wazuh-alerts-4.x-2024.04* (screenshot attached). Also note that you don't need to perform any restart for this operation.
I hope this helps. If you have any other query, do not hesitate to ask.
Best regards.