---
title: "Cleanup ALL Orphaned Executions"
method: POST
path: "/api/admin/diagnostics/executions/cleanup-all-orphaned"
tags: ["v2", "admin", "diagnostics", "admin"]
---

# Cleanup ALL Orphaned Executions

`POST /api/admin/diagnostics/executions/cleanup-all-orphaned`

Cleanup ALL orphaned executions (>24h old) by directly updating DB status.
Operates on all executions, not just paginated results.

Returns:
    Number of executions cleaned up and success message

## Response `200`

Successful Response

- StopExecutionResponse — Response model for stop execution operations
  - `success` boolean, required
  - `stopped_count` integer
  - `message` string, required

## Other responses

- `401` — Authentication required

---

[API](https://skmtc.net/significant-gravitas/apis/autogpt-agent-server.md) · [All operations](https://skmtc.net/significant-gravitas/apis/autogpt-agent-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/significant-gravitas/autogpt-agent-server/versions/382041c7ecb2/schema)
