misonoteApp Center

Hugging Face cache (~/.cache/huggingface/hub): safe to delete?

Check before deletingMay still be useful; Thermo moves it to the Trash by default, so you can change your mind.

Where it is

  • ~/.cache/huggingface/hub

What it is

The huggingface_hub library, used by transformers, diffusers, sentence-transformers and many other tools, downloads model repositories into a shared cache: one folder per repo, with content blobs, a snapshot per revision and refs. HF_HUB_CACHE or HF_HOME can move it elsewhere.

Why it gets so big

Model checkpoints are huge, and each new revision you pull adds blobs while older ones stay. Notebooks and tutorials also quietly download models you may only use once.

Is it safe to delete?

Review it model by model. A deleted model is downloaded again the next time code asks for it, but that can be a long download, it won't work offline, and gated or private models need your access token again. Delete whole model folders rather than individual files inside them so the cache stays consistent.

Tip

The Hugging Face CLI's delete-cache command shows an interactive list of cached repos and revisions, so you can pick exactly what to remove.

See how much space it uses

du -sh "$HOME/.cache/huggingface/hub" 2>/dev/null

Clean it with the tool’s own command

huggingface-cli delete-cache