LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    Chat LangChain

    What can I help with?

    Enter to send·Shift+Enter new line

    Menu

    LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph.checkpoint.postgresaioAsyncPostgresSaverprune
    Method●Since v3.2

    prune

    Copy
    prune(
      self,
      thread_ids: Sequence[str],
      *,
      strategy: str = 'keep_latest'
    
    View source on GitHub
    )
    ->
    None

    Parameters

    NameTypeDescription
    thread_ids*Sequence[str]
    strategystr
    Default:'keep_latest'

    Prune checkpoints for the given threads.

    See PostgresSaver.prune for what each strategy keeps.

    The thread IDs to prune.

    "keep_latest" or "delete".