Bottom Line: It is 100% safe to delete unused Ollama models. Running ollama rm <model> or clearing ~/.ollama/models/blobs will NOT delete your Python AI code, prompt histories, or application settings.
What is the Ollama Models Cache Folder?
Located at ~/.ollama/models on Linux/macOS (and %USERPROFILE%\.ollama\models on Windows), this folder is managed by Ollama (the local Large Language Model runner).
When you run ollama run llama3 or test open-source AI models (Mistral, Phi-3, Gemma, CodeLlama), Ollama downloads quantized GGUF tensor model files into models/blobs. Because 7B, 13B, and 70B parameter models weigh 4 GB to 40 GB each, experimenting with multiple LLMs hoards 30 GB to 150 GB+ of SSD storage.
Can You Delete Ollama Models?
✅ Yes, it is completely safe to delete.
- Zero code loss: Your API integration scripts, LangChain/LlamaIndex code, and chat UIs remain 100% safe.
- Auto-downloaded: Running
ollama run <model>in the future will simply re-fetch the model blob from Ollama Library.
How to Safely Clean Up Ollama Models
Method 1: Remove Models via Ollama CLI (Recommended)
- Open your terminal.
- List installed local models and sizes:
ollama list - Remove models you no longer need:
ollama rm llama2 ollama rm mistral
Method 2: Purge Orphan Model Blobs
# macOS / Linux
rm -rf ~/.ollama/models/blobs/*
# Windows (PowerShell)
Remove-Item -Recurse -Force $env:USERPROFILE\.ollama\models\blobs\*
Related Guides
- Learn about deleting Hugging Face cache.
- How to clean up PyTorch model cache.
- Check if you can clean Docker Data.
Discussion
Loading authentication...