Skip to main content
Deleting a run removes the run and its saved checkpoints, except checkpoints that another resource still uses. To end a run but keep its checkpoints, deactivate it instead. To remove some checkpoints and keep the run, delete those checkpoints. The Baseten CLI doesn’t delete runs; use the Python SDK or the REST API. Deleting an active run deactivates it first. The response lists the checkpoints Baseten kept because a resource such as a deployment still uses them, and they stay usable until that use stops.
Deleting a run permanently deletes the run and every checkpoint that nothing else uses. You can’t undo it. To keep a copy of a checkpoint, download its files first.
The Python SDK and the curl examples authenticate with BASETEN_API_KEY. Export your API key first:
To delete a run and its checkpoints:Call delete_run() on a ServiceClient, replacing <run_id> with the run ID:
The result has the deleted run’s id and a kept_checkpoints list. Check the list for any checkpoints Baseten kept because they’re still in use.
To confirm the deletion, list your runs including inactive ones and check that the deleted run ID isn’t listed:

Next steps