[GH-ISSUE #9152] Remove partly downloaded model in case there are no space left on device #68011

Closed
opened 2026-05-04 12:15:09 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @kirugan on GitHub (Feb 16, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9152

Let's say you run ollama run deepseek-r1:671b (which takes ~400Gb) and it fails due to no space left on device error. What you end up with is partly downloaded model (which I believe is not used for future downloads, correct me if I'm wrong) and no space on your hard drive.

But perhaps the best approach would be:

  1. check size of model
  2. ensure that storage has available space (if not, tell user about it and stop download)
  3. download model
  4. in case of the failure remove partly downloaded model
Originally created by @kirugan on GitHub (Feb 16, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9152 Let's say you run `ollama run deepseek-r1:671b` (which takes ~400Gb) and it fails due to `no space left on device` error. What you end up with is partly downloaded model (which I believe is not used for future downloads, correct me if I'm wrong) and no space on your hard drive. But perhaps the best approach would be: 1. check size of model 2. ensure that storage has available space (if not, tell user about it and stop download) 3. download model 4. in case of the failure remove partly downloaded model
GiteaMirror added the feature request label 2026-05-04 12:15:09 -05:00
Author
Owner

@rick-github commented on GitHub (Feb 16, 2025):

Partly downloaded models will be removed if you restart the server. If you make room on the filesystem and restart the download, the previously downloaded parts of the model will be used. Size of the model is shown on the model page.

<!-- gh-comment-id:2661557288 --> @rick-github commented on GitHub (Feb 16, 2025): Partly downloaded models will be removed if you restart the server. If you make room on the filesystem and restart the download, the previously downloaded parts of the model will be used. Size of the model is shown on the model page.
Author
Owner

@kirugan commented on GitHub (Feb 16, 2025):

Ok, what are your thoughts on warning or something similar on attempt to download model that won't fit on disk ?

<!-- gh-comment-id:2661597940 --> @kirugan commented on GitHub (Feb 16, 2025): Ok, what are your thoughts on warning or something similar on attempt to download model that won't fit on disk ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#68011