[PR #12832] [MERGED] fix(cmd): unload model before removal #13972

Closed
opened 2026-04-13 00:41:32 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12832
Author: @mxyng
Created: 10/29/2025
Status: Merged
Merged: 10/30/2025
Merged by: @mxyng

Base: mainHead: mxyng/cmd-remove


📝 Commits (1)

  • 5d9ab71 fix(cmd): unload model before removal

📊 Changes

1 file changed (+18 additions, -13 deletions)

View changed files

📝 cmd/cmd.go (+18 -13)

📄 Description

this change fixes two bugs with ollama rm:

  1. before a model is removed, it will first be stopped. this only happens for the first argument and skipped for all other models
  2. models are unloaded indiscriminately. this errors for cloud models and should be omitted

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/12832 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 10/29/2025 **Status:** ✅ Merged **Merged:** 10/30/2025 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/cmd-remove` --- ### 📝 Commits (1) - [`5d9ab71`](https://github.com/ollama/ollama/commit/5d9ab71da3ca1cde59aad53726c68fd81f5346cb) fix(cmd): unload model before removal ### 📊 Changes **1 file changed** (+18 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+18 -13) </details> ### 📄 Description this change fixes two bugs with `ollama rm`: 1. before a model is removed, it will first be stopped. this only happens for the first argument and skipped for all other models 2. models are unloaded indiscriminately. this errors for cloud models and should be omitted --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 00:41:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#13972