[GH-ISSUE #2892] Introduce some smart way to identify and cleanup unfinished downloads to avoid space wastage #1767

Closed
opened 2026-04-12 11:47:08 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @kha84 on GitHub (Mar 3, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2892

Is your feature request related to a problem? Please describe.

If you run ollama run/pull <some_new_model_you_didnt_have> and then for whatever reason the downloading stops in-between (like network issues) or you interrupt it yourself (with control+c), the unfinished files are left (supposedly) in ~/.ollama/models/blobs/sha256:*-partial* occupying quite a lot of space, depending on how big model files you were downloading and when exactly this was interrupted. Running ollama list doesn't show those unfinished downloads - so you don't see them, don't know they exist, can't remove them and reclaim space back. This leads to the hdd space wastage without user knowing

Describe the solution you'd like

There should be a way for ollama to have a reconcile procedure, to identify and warn user about whatever files are related to unfinished downloads (and optionally drop them). Ideally this reconcile code should be executed together with every other ollama command that user might spawn and appropriate warning message should be printed to stdout or stderr, that user has some unfinished downloads that might take a space.

Describe alternatives you've considered

  1. Manually deleting files related to unfinished downloads (might be tricky for users, because the info about where ollama holds all it's internals and how it's organized isn't part of official documentation - it's kinda hidden under the hood)

  2. ollama list to show unfinished downloads so they could be deleted with ollama rm

Originally created by @kha84 on GitHub (Mar 3, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2892 **Is your feature request related to a problem? Please describe.** If you run `ollama run/pull <some_new_model_you_didnt_have>` and then for whatever reason the downloading stops in-between (like network issues) or you interrupt it yourself (with control+c), the unfinished files are left (supposedly) in `~/.ollama/models/blobs/sha256:*-partial*` occupying quite a lot of space, depending on how big model files you were downloading and when exactly this was interrupted. Running `ollama list` doesn't show those unfinished downloads - so you don't see them, don't know they exist, can't remove them and reclaim space back. This leads to the hdd space wastage without user knowing **Describe the solution you'd like** There should be a way for ollama to have a **reconcile** procedure, to identify and warn user about whatever files are related to unfinished downloads (and optionally drop them). Ideally this reconcile code should be executed together with every other `ollama` command that user might spawn and appropriate warning message should be printed to stdout or stderr, that user has some unfinished downloads that might take a space. **Describe alternatives you've considered** 1. Manually deleting files related to unfinished downloads (might be tricky for users, because the info about where ollama holds all it's internals and how it's organized isn't part of official documentation - it's kinda hidden under the hood) 2. `ollama list` to show unfinished downloads so they could be deleted with `ollama rm`
Author
Owner

@easp commented on GitHub (Mar 3, 2024):

FYI, the current behavior is to clear the stray parts of partially downloaded models when the service is restarted.

<!-- gh-comment-id:1975381873 --> @easp commented on GitHub (Mar 3, 2024): FYI, the current behavior is to clear the stray parts of partially downloaded models when the service is restarted.
Author
Owner

@pdevine commented on GitHub (Mar 4, 2024):

As @easp mentioned, you can just restart the service. If you are using it through Mac/Windows you can stop the service in the task bar and re-launch, and if you're using linux you can use systemd to restart the service.

I'm going to go ahead and close the issue; I realize this maybe needs to be a little more visible though. Thank you for the issue!

<!-- gh-comment-id:1975952083 --> @pdevine commented on GitHub (Mar 4, 2024): As @easp mentioned, you can just restart the service. If you are using it through Mac/Windows you can stop the service in the task bar and re-launch, and if you're using linux you can use systemd to restart the service. I'm going to go ahead and close the issue; I realize this maybe needs to be a little more visible though. Thank you for the issue!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1767