[GH-ISSUE #5203] OLLAMA_MODELS is not honored after being changed (beyond the first time it is set) #49781

Closed
opened 2026-04-28 12:54:45 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @Nantris on GitHub (Jun 21, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5203

What is the issue?

I set OLLAMA_MODELS to a new directory to ensure a large download would have space, and then tried to move OLLAMA_MODELS back to the default directory on Windows - and although the environmental variable is set, ollama continues to search in the previous OLLAMA_MODELS path, even after restarting all terminals or rebooting.

OS

Windows (not via WSL)

GPU

Nvidia

CPU

AMD

Ollama version

0.1.44

Originally created by @Nantris on GitHub (Jun 21, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5203 ### What is the issue? I set `OLLAMA_MODELS` to a new directory to ensure a large download would have space, and then tried to move `OLLAMA_MODELS` back to the default directory on Windows - and although the environmental variable is set, ollama continues to search in the previous `OLLAMA_MODELS` path, even after restarting all terminals or rebooting. ### OS Windows (not via WSL) ### GPU Nvidia ### CPU AMD ### Ollama version 0.1.44
GiteaMirror added the bug label 2026-04-28 12:54:45 -05:00
Author
Owner

@Nantris commented on GitHub (Jun 21, 2024):

Suddenly this seems resolved, but I did upgrade to 0.1.45, so that could be related. I'll re-open if I see this again or if someone else reports the same.

<!-- gh-comment-id:2183465012 --> @Nantris commented on GitHub (Jun 21, 2024): Suddenly this seems resolved, but I did upgrade to 0.1.45, so that could be related. I'll re-open if I see this again or if someone else reports the same.
Author
Owner

@Nantris commented on GitHub (Jun 21, 2024):

This indeed does seem to be a problem. I confirmed the environmental variable is set as expected in the terminal, but ollama doesn't seem to care.

<!-- gh-comment-id:2183491397 --> @Nantris commented on GitHub (Jun 21, 2024): This indeed does seem to be a problem. I confirmed the environmental variable is set as expected in the terminal, but ollama doesn't seem to care.
Author
Owner

@Nantris commented on GitHub (Jun 21, 2024):

I don't know what the deal is. When I re-open the terminal an hour later the variable is honored now - but I checked there were no remaining terminal processes before re-opening earlier and it continued to use the old directory.

<!-- gh-comment-id:2183550979 --> @Nantris commented on GitHub (Jun 21, 2024): I don't know what the deal is. When I re-open the terminal an hour later the variable is honored now - but I checked there were no remaining terminal processes before re-opening earlier and it continued to use the old directory.
Author
Owner

@pulinagrawal commented on GitHub (Apr 21, 2025):

Restarting ollama worked for me.

<!-- gh-comment-id:2817564675 --> @pulinagrawal commented on GitHub (Apr 21, 2025): Restarting ollama worked for me.
Author
Owner

@dhiltgen commented on GitHub (Jul 1, 2025):

In 0.9.4 we now have a settings page to make it much easier to configure where the models are stored.

Image
<!-- gh-comment-id:3025862787 --> @dhiltgen commented on GitHub (Jul 1, 2025): In 0.9.4 we now have a settings page to make it much easier to configure where the models are stored. <img width="654" alt="Image" src="https://github.com/user-attachments/assets/c99f0085-6c2b-4177-a9b8-75ed68116586" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#49781