~/.cache/huggingface is where Hugging Face libraries cache AI models and datasets that your Python scripts downloaded. It is safe to clear because everything re-downloads from the Hub when a script needs it. Expect large downloads, and delete selectively with huggingface-cli delete-cache to keep the models you use.
- Path
~/.cache/huggingface- What it is
- Downloaded AI models, datasets and tokenizers from the Hugging Face Hub
- Typical size
- One model is often several gigabytes, so this folder is commonly tens of gigabytes or more
- Made by
- Hugging Face libraries (transformers, diffusers, huggingface_hub)
- Safe to delete?
- Look first (it all re-downloads, but models can be many gigabytes and slow to fetch again)
- Comes back?
- Yes, they download again the next time a script uses them (large downloads, and not at all offline)
What is in this folder?
The model files live in ~/.cache/huggingface/hub, in folders named like models--org--name and datasets--org--name. Each holds several revisions, with the large weight files kept once and linked from snapshots. Hugging Face's documentation says the default location can be changed with the HF_HOME or HF_HUB_CACHE environment variables.
Models that you downloaded by hand into another folder are not in this cache.
Is it safe to delete?
Yes, in the sense that nothing here is unique: the Hub still has it. The trade-off is download size. A model that took five minutes to pull will take five minutes again, and if you are offline or the model was removed from the Hub, you cannot get it back.
Models you fine-tuned and saved to the cache only (not pushed or saved elsewhere) exist only here. Check before deleting.
How do I clear it by hand?
- Stop any Python script or notebook that is using a model.
- Use the interactive cleaner to pick what to delete.
- Or delete the whole cache if you want it all back.
huggingface-cli delete-cache
rm -rf ~/.cache/huggingface/hubNewer huggingface_hub releases replacehuggingface-cliwith anhfcommand that has a cache subcommand. Runhf cache --helpif the first command is not found.
How do I stop it growing?
Delete models you tried once, and set HF_HOME to an external drive if you want the cache off your Mac.
How Clean House handles it
Clean House recognizes the Hugging Face cache and labels each model or dataset by its name, with the plain note that it downloads again next time it is needed. It groups them under AI models so you can see which are largest. Anything you clear goes to the Trash, and Recently Cleared can put it back.