[PR #14473] cmd: show total freed size when removing multiple models #61395

Open
opened 2026-04-29 16:27:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14473
Author: @Anandesh-Sharma
Created: 2/26/2026
Status: 🔄 Open

Base: mainHead: feat-rm-show-size


📝 Commits (1)

  • b6190a3 cmd: show total freed size when removing multiple models

📊 Changes

1 file changed (+14 additions, -0 deletions)

View changed files

📝 cmd/cmd.go (+14 -0)

📄 Description

Summary

  • When deleting multiple models with ollama rm, displays the total disk space freed after all deletions
  • Only shows the summary when more than one model is deleted (single model deletion behavior is unchanged)
  • Uses format.HumanBytes for consistent formatting with ollama list

Example

$ ollama rm deepseek-r1:8b gpt-oss:20b deepseek-r1:latest
deleted 'deepseek-r1:8b'
deleted 'gpt-oss:20b'
deleted 'deepseek-r1:latest'

total freed: 22.9 GB

Fixes #14013


🔄 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/14473 **Author:** [@Anandesh-Sharma](https://github.com/Anandesh-Sharma) **Created:** 2/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat-rm-show-size` --- ### 📝 Commits (1) - [`b6190a3`](https://github.com/ollama/ollama/commit/b6190a3acec2fba8faf2cb4da64364a06e1b8eff) cmd: show total freed size when removing multiple models ### 📊 Changes **1 file changed** (+14 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+14 -0) </details> ### 📄 Description ## Summary - When deleting multiple models with `ollama rm`, displays the total disk space freed after all deletions - Only shows the summary when more than one model is deleted (single model deletion behavior is unchanged) - Uses `format.HumanBytes` for consistent formatting with `ollama list` ### Example ``` $ ollama rm deepseek-r1:8b gpt-oss:20b deepseek-r1:latest deleted 'deepseek-r1:8b' deleted 'gpt-oss:20b' deleted 'deepseek-r1:latest' total freed: 22.9 GB ``` Fixes #14013 --- <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-29 16:27:54 -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#61395