How to delete Ollama models and free disk space
Every ollama pull drops multi-GB model files on disk. The clean way to get space back is ollama rm: it removes the model and any layers no other model still uses. Deleting the folder by hand works too, but you lose every model at once.
Where Ollama stores models
- macOS:
~/.ollama/models - Linux, installed with the official script (runs as the
ollamaservice user):/usr/share/ollama/.ollama/models - Linux, running
ollama serveas yourself:~/.ollama/models - Windows:
%USERPROFILE%\.ollama\models
If the OLLAMA_MODELS environment variable is set, that folder wins.
See what is taking space
ollama list # SIZE column per model
du -sh ~/.ollama/models
sudo du -sh /usr/share/ollama/.ollama/models
"{0:N1} GB" -f ((Get-ChildItem "$env:USERPROFILE\.ollama\models" -Recurse -File | Measure-Object Length -Sum).Sum / 1GB)Remove models you no longer use
ollama ps # models loaded right now ollama stop llama3.1:70b # unload first if it is running ollama rm llama3.1:70b
Replace llama3.1:70b with a name from ollama list. Nothing is re-downloaded until you run or pull that model again.
Move models instead of deleting
Point OLLAMA_MODELS at an external or larger drive, move the existing models folder there, then restart Ollama. On the macOS app use launchctl setenv OLLAMA_MODELS /Volumes/External/ollama-models; on Linux add Environment="OLLAMA_MODELS=..." with sudo systemctl edit ollama.service. If you skip the move, Ollama sees an empty folder and downloads again.
Measure with devdisk
devdisk is a free, read-only scanner. It lists ~/.ollama/models under Review first (AI models), next to your other dev caches. It never deletes anything; it only shows sizes and writes a cleanup script you read and run yourself. The Linux system-service path above is outside your home folder, so check it with du.
curl -fsSLO https://disk.sadana.app/devdisk.py && python3 devdisk.py
iwr https://disk.sadana.app/devdisk.py -OutFile devdisk.py; py devdisk.py
Want one-click cleanup?
A planned devdisk desktop app for Mac and Windows: live treemap, cleanup that moves files to the Trash, scheduled scans. One email when it launches, with an early-supporter price. Your address is used only for that, and every email has an unsubscribe link.
FAQ
Is it safe to delete the ~/.ollama/models folder?
It will not break Ollama, but every model is gone and must be pulled again. ollama rm lets you keep the ones you use.
Why did ollama rm free less than the listed size?
Models that share a base layer share the same files on disk. Those files are only removed when no remaining model uses them.
Does devdisk remove models for me?
No. It is read-only. The generated script suggests ollama rm lines, commented out, for you to review.