[GH-ISSUE #279] Files and folders in .ollama aren't getting cleaned up #121

Closed
opened 2026-04-12 09:39:20 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @technovangelist on GitHub (Aug 4, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/279

I created a sentiments modelfile and the blobs and manifests folders were populated. Then i deleted that model, and the files were removed but the folders under manifests were not.

Then I noticed that sentiments uses orca and doesn't specify a SYSTEM instruction, so inherits it from orca. So updated the modelfile to have a SYSTEm instruction that is blank. created it. now in blobs I have a new layer that has 0 size, as expected. the only model that uses this empty system prompt is sentiments.

I further updated the modelfile to pull the system prompt out of the template and into the system instruction in the modelfile. and created again. Now the manifest references the new system prompt digest in blobs. but even though no model file is using the empty system prompt it is still there.

I ran ollama rm sentiments, and all the layers in sentiments were deleted, but that empty system prompt remains.

Originally created by @technovangelist on GitHub (Aug 4, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/279 I created a sentiments modelfile and the blobs and manifests folders were populated. Then i deleted that model, and the files were removed but the folders under manifests were not. Then I noticed that sentiments uses orca and doesn't specify a SYSTEM instruction, so inherits it from orca. So updated the modelfile to have a SYSTEm instruction that is blank. created it. now in blobs I have a new layer that has 0 size, as expected. the only model that uses this empty system prompt is sentiments. I further updated the modelfile to pull the system prompt out of the template and into the system instruction in the modelfile. and created again. Now the manifest references the new system prompt digest in blobs. but even though no model file is using the empty system prompt it is still there. I ran ollama rm sentiments, and all the <current> layers in sentiments were deleted, but that empty system prompt remains.
GiteaMirror added the bug label 2026-04-12 09:39:20 -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#121