Installing Ollama in a different directory on Windows
Specify the installation directory by passing the /DIR
parameter to the installer.
.\OllamaSetup.exe /DIR="E:\Ollama"
Downloading models to a different drive
Set the OLLAMA_MODELS
environment variable to a directory on the other drive. If any models have already been downloaded, stop Ollama if it’s running and move the models from C:\User\matko\.ollama\models
to the new directory. Then start Ollama again.
Any models installed using the Ollama CLI should now be downloaded to the new directory. For example, this will download the DeepSeek R1 model to the new directory if it hasnt been downloaded yet:
ollama run deepseek-r1