[GH-ISSUE #2472] Ollama floods /tmp with unnecessary libraries #63483

Closed
opened 2026-05-03 13:47:27 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @knoopx on GitHub (Feb 13, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2472

Originally assigned to: @dhiltgen on GitHub.

This is what my /tmp dir looks after a few hours. I have no idea why ollama does this and why no cleanup is in place. ollama version is 0.1.24. haven't noticed this before this release.

image
image

Originally created by @knoopx on GitHub (Feb 13, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2472 Originally assigned to: @dhiltgen on GitHub. This is what my `/tmp` dir looks after a few hours. I have no idea why ollama does this and why no cleanup is in place. ollama version is 0.1.24. haven't noticed this before this release. ![image](https://github.com/ollama/ollama/assets/100993/e48031ef-fcc3-4617-a005-0ff7f5b7d4d6) ![image](https://github.com/ollama/ollama/assets/100993/dd8c5c71-b7f9-4f78-86d0-5870c2dfdc03)
GiteaMirror added the questionbug labels 2026-05-03 13:47:32 -05:00
Author
Owner

@remy415 commented on GitHub (Feb 14, 2024):

The files in the /tmp directory are libraries bundled with the llama.cpp build. Normally the ollama application removes the files in the /tmp directory, for some reason it isn't. That being said, that folder is wiped clean on reboot, and it's safe to remove any file in that directory.

<!-- gh-comment-id:1943821406 --> @remy415 commented on GitHub (Feb 14, 2024): The files in the /tmp directory are libraries bundled with the llama.cpp build. Normally the ollama application removes the files in the /tmp directory, for some reason it isn't. That being said, that folder is wiped clean on reboot, and it's safe to remove any file in that directory.
Author
Owner

@dhiltgen commented on GitHub (Mar 11, 2024):

@knoopx can you try upgrading to the latest version? Under normal circumstances, the system should clean these up on graceful shutdown, so if you're still seeing a lot of them, that might imply the server is crashing. Can you check the server log and see if you see crashes? If so, lets get to the bottom of those.

<!-- gh-comment-id:1989613510 --> @dhiltgen commented on GitHub (Mar 11, 2024): @knoopx can you try upgrading to the latest version? Under normal circumstances, the system should clean these up on graceful shutdown, so if you're still seeing a lot of them, that might imply the server is crashing. Can you check the server log and see if you see crashes? If so, lets get to the bottom of those.
Author
Owner

@glaudiston commented on GitHub (Sep 26, 2024):

Do we have a environment variable to set this to another folder?

<!-- gh-comment-id:2377601190 --> @glaudiston commented on GitHub (Sep 26, 2024): Do we have a environment variable to set this to another folder?
Author
Owner

@dhiltgen commented on GitHub (Sep 26, 2024):

@glaudiston see ollama serve --help - this is covered by OLLAMA_TMPDIR

<!-- gh-comment-id:2377627670 --> @dhiltgen commented on GitHub (Sep 26, 2024): @glaudiston see `ollama serve --help` - this is covered by OLLAMA_TMPDIR
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#63483