Bottom Line: It is 100% safe to clear the Hugging Face Hub model cache. Running huggingface-cli delete-cache will NOT delete your Python machine learning scripts, datasets, or fine-tuned checkpoints.
What is the Hugging Face Hub Cache Folder?
Located at ~/.cache/huggingface/hub on Linux/macOS (and %USERPROFILE%\.cache\huggingface\hub on Windows), this folder is managed by the Hugging Face transformers and diffusers libraries.
When downloading open-source models from Hugging Face (BERT, RoBERTa, Stable Diffusion, Llama, Falcon), Hugging Face uses a symlinked cache architecture inside models--[author]--[repo]. Over time, duplicate model commits and unlinked snapshot revisions hoard 20 GB to 100 GB+ of drive space.
Can You Delete Hugging Face Hub Cache?
✅ Yes, it is completely safe to delete.
- No code risk: Your Python scripts, fine-tuning scripts, and training code stay 100% safe.
- Auto-downloaded: Calling
AutoModel.from_pretrained("...")will re-fetch required model weights automatically.
How to Safely Clean Up Hugging Face Cache
Method 1: Using Hugging Face CLI Interactive Cache Cleaner (Recommended)
- Open your terminal.
- Launch the interactive cache manager:
huggingface-cli delete-cache - Select older model revisions to delete and press Enter.
Method 2: Manual Directory Wipe
# macOS / Linux
rm -rf ~/.cache/huggingface/hub/*
# Windows (PowerShell)
Remove-Item -Recurse -Force $env:USERPROFILE\.cache\huggingface\hub\*
Related Guides
- Learn about deleting Hugging Face cache.
- How to clean up PyTorch model cache.
- Check if you can clean Ollama models cache.
Discussion
Loading authentication...