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

  1. Stop Ollama:
    sudo systemctl stop ollama
  2. Create the new folder and give the ollama user access. Ollama needs read and write access to it:
    sudo mkdir -p /data/ollama-models
    sudo chown -R ollama:ollama /data/ollama-models
  3. Copy the existing models (use rsync so that an interrupted copy can be repeated):
    sudo rsync -a /usr/share/ollama/.ollama/models/ /data/ollama-models/
  4. 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"
  5. Start Ollama and check:
    sudo systemctl start ollama
    ollama list
    Your models should be listed as before.
  6. 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 list is empty: check the path in sudo systemctl cat ollama, and that the folder holds the folders blobs and manifests.
  • Permission errors in journalctl -e -u ollama: run the chown command 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?

Prefer a hand with the setup? Our engineers can do it for you: Hire an Expert, or use our on-demand server management.

Was this answer helpful? 0 Users Found This Useful (0 Votes)