Where is the Hugging Face cache on Mac, and how do you clear it?
Every model you load with transformers, diffusers, mlx-lm or huggingface-cli download is cached so it doesn't download twice. On a Mac used for local AI, that cache often grows past 50 GB.
Default location
~/.cache/huggingface/hub
Each model or dataset gets its own folder, named like models--mlx-community--Llama-3.2-3B-Instruct-4bit or datasets--squad.
| Environment variable | Effect |
|---|---|
HF_HUB_CACHE | Sets the hub cache folder directly. |
HF_HOME | Moves everything Hugging Face stores; the cache becomes $HF_HOME/hub. |
See what's using space
huggingface-cli scan-cache
This lists every cached repo with its size and when it was last accessed.
Delete models interactively
huggingface-cli delete-cache
This opens a checklist where you pick which repos or revisions to remove. You can also delete a whole models--… folder in Finder; it's re-downloaded the next time something loads that model.
Deleting a model folder while a script is loading that model can make the script fail. Stop running jobs first.
Rather not do this by hand? Storage Cleaner finds every cached Hugging Face model and dataset in one scan, shows when you last used each one, and removes them safely with Undo.
Try Storage Cleaner freeFrequently asked
Does MLX use the same cache? Yes. mlx-lm and other MLX tools download through the Hugging Face hub, so their models live in the same folder.
What about LM Studio? LM Studio keeps its own copies in ~/.lmstudio/models, separate from the Hugging Face cache.