POST /_fleet/maintenance/cleanup?

Hi, I have a cluster with a single node where I’m seeing some indices that I can’t delete because Elasticsearch tells me that my elastic user needs superuser permissions. I found the API request POST /_fleet/maintenance/cleanup, but I can’t find anything in the Elastic documentation that explains whether it might affect other parts of the system. Could you help me understand what it does?

{
"failed_step": "delete",
"step_info": {
"type": "security_exception",
"reason": "action [indices:admin/delete] is unauthorized for user [elastic] with effective roles [superuser] on restricted indices [.ds-.fleet-actions-results-2025.03.03-000040], this action is granted by the index privileges [delete_index,manage,all]"
}
}

Hello @Juan_de_Dios_Macias1

Welcome to the Community!!

Could you please share the elastic documentation link related to cleanup API ?

POST /_fleet/maintenance/cleanup

As per the error message it failed for index : .ds-.fleet-actions-results-2025.03.03-000040

Please share what we are trying to achieve on this single node cluster when you say cleanup?

For Cannot delete an index with elastic there is similar blog with solution :

Thanks!!