LangGraph Thread Deletion Runbook

Last updated: September 24, 2025

When to Use

If TTL (time-to-live) is not configured in your LangGraph deployment, threads will accumulate over time. This can result in increased memory usage and degraded performance. Manually deleting threads is the only way to get rid of these threads set without a TTL

Use this runbook whenever you need to manually delete threads.

Run Cleanup

https://github.com/langchain-ai/langgraph-management-tools/tree/main/thread-cleanup

Run the cleanup tool with your deployment details:

python3 delete.py --url YOUR_LANGGRAPH_URL --api-key YOUR_LANGSMITH_API_KEY

Example:

python3 delete.py \
  --url https://your-deployment.us.langgraph.app \
  --api-key your_langsmith_api_key_here

Deletion Options

The tool provides an interactive menu:

  1. Delete by TIME – remove threads older than hour/day/week/month/custom

  2. Delete by STATUS – idle, running, success, error

  3. Delete by RUNS COUNT – by number of executions

  4. Delete by GRAPH ID – from specific graphs

  5. PREVIEW all threads – view without deleting

  6. Delete ALL threads – removes everything

  7. Exit – quit without changes