Body Parameters
Name of the model to delete (e.g., “llama2”, “mistral:7b”)
Response
Indicates if the model was deleted successfully
curl --request DELETE \
--url http://localhost:3000/api/v1/ollama/delete-model \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"modelName": "llama2"
}'
{
"success": true,
"message": "Successfully deleted model: llama2"
}
Notes
This action is irreversible. Once deleted, you’ll need to pull the model again to use it.
- Deleting a model frees up disk space
- The model name must match exactly (including tag)
- You can delete specific variants by including the tag (e.g., “llama2:7b”)
- To delete all variants, you must delete each one individually