remove_model
Remove a local AI model from Ollama with a safe dry-run option to preview deletion. Enables undo recording for reversible removals.
Instructions
[WRITE][risk=high] Delete a local model. Destructive — pass dry_run=True to preview.
Captures the model's manifest so the harness records an undo (re-pull).
An undo is recorded only when the allow/deny policy would permit re-pulling the model. For a denied one the result says reversible=false and explains why, rather than recording a re-pull that undo_apply is bound to refuse. The dry-run preview carries the same verdict, so the caller learns it before the deletion rather than after.
Args: model: Model name to delete. dry_run: If True, return what WOULD be deleted without deleting. target: Ollama target name from config; omit for the default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| target | No | ||
| dry_run | No |