Bottom Line: Artificial intelligence developers, machine learning researchers, and local LLM hobbyists using Ollama, LM Studio, Hugging Face Transformers, PyTorch, and ComfyUI often find their SSDs filled with multi-gigabyte GGUF, Safetensors, and PyTorch model weights. Running this cleanup guide reclaims 30 GB to 200 GB+ of storage space safely.
The AI Model Weight Storage Crisis
Local AI models (Llama 3, Mistral, DeepSeek, Stable Diffusion XL, Whisper) are massive. A single 70B quantized GGUF model weighs 40 GB, while Stable Diffusion checkpoint weights (.safetensors) weigh 7 GB each.
Because model loaders silently save models to hidden home directories (~/.cache or ~/.ollama), developers frequently run out of SSD space without knowing where their storage went.
+-------------------------------------------------------------------------+
| [System: 30GB] [Ollama GGUF & Hugging Face Weights: 180GB] [Free: 2GB] |
+-------------------------------------------------------------------------+
^
Hidden AI Model Bloat!
Tool-by-Tool AI Storage Audit & Cleanup Commands
1. Ollama GGUF Model Store (~/.ollama/models) — 20 GB to 100 GB
Ollama saves pulled models (ollama run llama3) as raw blobs inside ~/.ollama/models/blobs.
How to List & Remove Ollama Models:
# List all locally installed Ollama models
ollama list
# Remove unused models
ollama rm llama3:70b
ollama rm mistral:7b
# Purge leftover blob manifests
rm -rf ~/.ollama/models/manifests/*
2. Hugging Face Hub Cache (~/.cache/huggingface/hub) — 20 GB to 80 GB
The transformers and diffusers Python libraries store downloaded model snapshots in ~/.cache/huggingface/hub.
How to Purge via CLI:
# Install Hugging Face official cache management CLI
pip install huggingface_hub
# Delete cached models interactively
huggingface-cli delete-cache
# Or force purge all cached models
rm -rf ~/.cache/huggingface/hub/*
3. PyTorch Hub Checkpoints (~/.cache/torch/hub) — 10 GB to 40 GB
# Clear downloaded PyTorch vision and audio model weights
rm -rf ~/.cache/torch/hub/checkpoints/*
4. vLLM & LM Studio Model Caches — 15 GB to 60 GB
# Clear vLLM model cache
rm -rf ~/.cache/vllm/*
# Clear LM Studio downloaded model folder
rm -rf ~/.cache/lm-studio/models/*
5. ComfyUI & Automatic1111 Stable Diffusion Checkpoints — 20 GB to 100 GB
Check your ComfyUI/models/checkpoints or stable-diffusion-webui/models/Stable-diffusion folders for duplicate .safetensors files.
AI Storage Safety & Impact Matrix
| Framework / Tool | Location | Safety Rating | Typical Size |
|---|---|---|---|
| Ollama Blobs | ~/.ollama/models/blobs |
✅ 100% Safe | Re-download via ollama pull. |
| Hugging Face Hub | ~/.cache/huggingface/hub |
✅ 100% Safe | Re-downloaded on next from_pretrained(). |
| PyTorch Checkpoints | ~/.cache/torch/hub |
✅ 100% Safe | Model weights re-downloaded dynamically. |
| vLLM Cache | ~/.cache/vllm |
✅ 100% Safe | Safe temporary engine cache. |
Frequently Asked Questions (FAQ)
Will deleting Hugging Face cache break my Python scripts?
No. If a script calls AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b"), Hugging Face will simply re-download the model weights if they are missing from local cache.
Related AI Guides
- Learn about vLLM Model Cache.
- Learn about Whisper Model Cache.
Discussion
Loading authentication...