How to clear Hugging Face cache on Mac
Sooner or later you’ll need to clear Hugging Face cache on a Mac: it never cleans itself, model weights take gigabytes each, and old versions stay next to new ones. On a Mac used for machine learning it often becomes the biggest folder. This guide shows where the cache is, how to see what takes space and how to delete models you can download again, while models you saved yourself stay.
Where the Hugging Face cache lives
Transformers, Diffusers and other libraries that download from the Hub share one cache, by default ~/.cache/huggingface/hub. Each model or dataset has its own folder there, such as models--google-bert--bert-base-cased. The HF_HOME or HF_HUB_CACHE environment variable moves it elsewhere.
When a model is updated on the Hub and you download it again, the previous files stay in case you need them. Nothing is deleted automatically.
The folder is hidden. To open it in Finder, choose Go › Go to Folder (Shift-Command-G) and type ~/.cache/huggingface.

See what takes space
The hf command comes with the huggingface_hub Python package. This command lists every cached model and dataset with its size, biggest first:
hf cache ls --sort size:descAdd --revisions to see every cached version of each model.
How to clear Hugging Face cache
This command permanently deletes a model from the cache. It shows what it will delete and how much, and asks first. The next time your code needs the model, it downloads it again. Use the ID from hf cache ls:
hf cache rm model/google-bert/bert-base-casedThis command deletes old versions no branch or tag points to anymore, and files left by interrupted downloads. Models you use stay:
hf cache pruneBoth commands take --dry-run to show what they would delete without deleting anything.
If hf cache doesn’t work
Older versions of huggingface_hub had huggingface-cli scan-cache and delete-cache, and later hf cache scan and hf cache delete. Version 1.0 replaced them with hf cache ls, rm and prune. Update the package:
python3 -m pip install -U huggingface_hubYou can also delete a model’s folder in ~/.cache/huggingface/hub by hand. Newer versions may keep files shared between models in a common blobs folder there, and hf cache prune removes those no model uses.
Keep your Mac tidy

MacWashing doesn’t touch Hugging Face models: use the hf commands above, they know which files each model uses. System Junk clears the caches of your other apps and developer tools.
Free trial · macOS 14 or later
Questions and answers
Is it safe to clear Hugging Face cache?
Yes, as long as you can download the models again. Your code fetches a deleted model the next time it needs it, which takes time for big ones.
Will this delete models I trained or saved?
Not if you saved them to your own folder, for example with save_pretrained. The cache holds only what was downloaded from the Hub.
Why is the Hugging Face cache so big?
Model weights take from hundreds of megabytes to tens of gigabytes, and each new version you download is kept next to the old one. Run hf cache prune after updates.