Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cmd: show total freed size when removing multiple models#14473

Open
Anandesh-Sharma wants to merge 1 commit intoollama:mainfrom
Anandesh-Sharma:feat-rm-show-size
Open

cmd: show total freed size when removing multiple models#14473
Anandesh-Sharma wants to merge 1 commit intoollama:mainfrom
Anandesh-Sharma:feat-rm-show-size

Conversation

@Anandesh-Sharma
Copy link

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

When deleting multiple models with `ollama rm`, display the total
disk space freed after all deletions complete. This gives users a
summary similar to docker/podman behavior.

Example:
  $ ollama rm model1 model2
  deleted 'model1'
  deleted 'model2'

  total freed: 18.2 GB

Fixes ollama#14013

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ollama rm should list total removed size

1 participant