Updated: 28 September 2026 · Applies to: Ollama 0.34 on Ubuntu 24.04 / 26.04 LTS
Ollama stores downloaded models in /usr/share/ollama/.ollama/models. A single model can take from a few GB to several tens of GB, so the system disk can fill up quickly. GPU servers often have a large second NVMe drive; this guide moves the model folder there.
Check the disk first
df -h sudo du -sh /usr/share/ollama/.ollama/models
Note which mount point has the free space, for example /data.
Move the models
- Stop Ollama:
sudo systemctl stop ollama
- Create the new folder and give the
ollamauser access. Ollama needs read and write access to it:sudo mkdir -p /data/ollama-models sudo chown -R ollama:ollama /data/ollama-models
- Copy the existing models (use
rsyncso that an interrupted copy can be repeated):sudo rsync -a /usr/share/ollama/.ollama/models/ /data/ollama-models/
- Tell Ollama where the models are now:
sudo systemctl edit ollama
In the editor add these lines, save and close:[Service] Environment="OLLAMA_MODELS=/data/ollama-models"
- Start Ollama and check:
sudo systemctl start ollama ollama list
Your models should be listed as before. - When everything works, free the old space by removing the old copy. Do this only after step 5 shows your models:
sudo rm -r /usr/share/ollama/.ollama/models/*
New server or fresh disk
You can also set OLLAMA_MODELS right after installing Ollama, before you download the first model. Then there is nothing to copy.
Free space by removing models you do not use
ollama list ollama rm MODEL-NAME
If Ollama cannot see the models after the move
ollama listis empty: check the path insudo systemctl cat ollama, and that the folder holds the foldersblobsandmanifests.- Permission errors in
journalctl -e -u ollama: run thechowncommand of step 2 again. - The drive is mounted after Ollama starts (for example a network or late-mounted disk): mount it first, then restart Ollama.
Frequently asked questions
Can I use a symbolic link instead?
The OLLAMA_MODELS setting is the documented way and easier to check later with systemctl cat ollama.
Does this apply to Ollama in Docker?
No. In a container, mount a volume or folder to /root/.ollama instead.
Official documentation: Ollama documentation: FAQ.
Want your own private AI without the setup work?
- Private LLM installation: we install and configure Ollama, the GPU driver and a chat interface on your own server.
- GPU dedicated servers: NVIDIA GPU servers for AI inference and training.
- AI implementation services: private LLMs, RAG, n8n automation and API integrations built on your own servers.
Prefer a hand with the setup? Our engineers can do it for you: Hire an Expert, or use our on-demand server management.
