# POST /\_fleet/maintenance/cleanup?

**URL:** <https://discuss.elastic.co/t/post-fleet-maintenance-cleanup/385355>\
**Category:** Elasticsearch\
**Created:** [March 5, 2026, 3:44pm UTC](https://discuss.elastic.co/t/post-fleet-maintenance-cleanup/385355 "2026-03-05T15:44:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan\_de\_Dios\_Macias1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juan_de_dios_macias1/32/140032_2.png) [@Juan\_de\_Dios\_Macias1](https://discuss.elastic.co/u/Juan_de_Dios_Macias1)\
**Post date:** [March 5, 2026, 3:44pm UTC](https://discuss.elastic.co/t/post-fleet-maintenance-cleanup/385355/1 "2026-03-05T15:44:53Z")

</div>

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]"`  
` }`  
`}`

---

<div class="post-metadata">

**Author:** ![Tortoise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tortoise/32/147587_2.png) [@Tortoise](https://discuss.elastic.co/u/Tortoise)\
**Post date:** [March 6, 2026, 4:48am UTC](https://discuss.elastic.co/t/post-fleet-maintenance-cleanup/385355/2 "2026-03-06T04:48:58Z")

</div>

Hello @Juan_de_Dios_Macias1

Welcome to the Community!!

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

```auto
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 :

> [@Cannot DELETE Index with Superuser](https://discuss.elastic.co/t/cannot-delete-index-with-superuser/303249):
>
> Hello, I have a problem on my Elasticsearch, i cannot delete an index with a superuser : I have some .reporting index, and i want to apply an ILM to this index because i dont need the old .reportng index. After changing the ILM specifying the deletion of indexes after X days, the old indexes entered the deletion stage. But, when ILM try to DELETE the olds index, this error occured : security\_exception: action [indices:admin/delete] is unauthorized for user [admin] with roles [superuser] on i…

> [@How to delete system indices?](https://discuss.elastic.co/t/how-to-delete-system-indices/338510):
>
> Hi all, My current cluster is an upgraded cluster from version 7.x to 8.x It has alot of system indices that nolonger require in the cluster but whenever i tried to delete it. I got this message { "error": { "root\_cause": [{ "type": "security\_exception", "reason": "action [indices:admin/delete] is unauthorized for user [elastic] with effective roles [superuser] on restricted indices [.kibana\_8.6.2\_001], this action is granted by the index privileges [delete\_index,…

Thanks!!
