Not available for ES instances on 5.x.x+ Copy and place the .sh file in your specific directory. Set the file as executable: $sudo chmod +x 755 Elasticsearch-Indice-Clearout.sh Manually call the script or set as a cronjob for scheduling.