Ollama stores downloaded models in a models folder under a hidden .ollama directory, and you can move it by setting the OLLAMA_MODELS environment variable. Model files are large, so people often relocate them to a bigger drive. On Linux with the standard installer, the ollama service user must be able to read and write the new folder.
Default locations
The Ollama FAQ lists these defaults:
- macOS:
~/.ollama/models - Linux:
/usr/share/ollama/.ollama/models - Windows:
C:\Users\%username%\.ollama\models
Model weights run from a few gigabytes to tens of gigabytes each, so a handful of models can fill a laptop's internal drive without warning.
How to move them
- Stop the Ollama service or app.
- Create the new folder on the larger drive.
- Copy the existing models folder into it if you want to keep what you have downloaded.
- Set OLLAMA_MODELS to the new path.
- Start Ollama again and list your models to confirm they are visible.
How you set an environment variable depends on how Ollama runs. For a desktop app it may be a user level variable. For a Linux service it is usually set in the service definition. Check the Ollama docs for your install type before you change it.
The Linux permission trap
The FAQ notes that on Linux with the standard installer, the ollama user needs read and write access to the directory you choose. If you point the variable at a folder owned by your own account, the service may fail to see or write models. Change the folder's ownership or group to match the service user, rather than opening it to everyone.
Security and hygiene
Model files are data you downloaded from the internet. A few habits keep the folder trustworthy:
- Store it on an encrypted volume if your laptop policy requires encryption at rest.
- Do not put it in a synced folder that uploads to a cloud drive by accident. You could copy huge files, and you may violate a data policy if prompts or adapters are stored nearby.
- Keep a list of which models you pulled, from where, and why. Remove ones you no longer use.
- Prefer weights in formats that store tensors as data. See safetensors, pickle and GGUF.
- On shared machines, set the folder permissions so other users cannot swap files in it.
Cleaning up
Prefer the Ollama command line for listing and removing models over deleting files by hand, so its own records stay consistent. Check the help output of your version for the exact commands.
Copying models between machines
If you need the same models on an offline machine, copy through a reviewed path and verify hashes on arrival. The offline transfer checklist covers it.
Quick check
Can I move the folder without re-downloading models?
Usually yes. Stop the service, copy the folder, set OLLAMA_MODELS to the new path and start again. Confirm your models are listed before you delete the old copy.
Why does Ollama fail after I changed the path on Linux?
The FAQ notes the ollama user needs read and write access to the directory. Fix ownership or group on the new folder.
Sources
Last reviewed: 19 October 2026.