SiftMac
Is it safe to delete? · AI tools · Updated 21 November 2026

Is it safe to delete ~/.cache/huggingface?

By Mohit Nippanikar, who makes SiftMac

The short answer
On this page
  1. What it is
  2. Where it is
  3. How big it gets
  4. How to delete it safely
  5. What happens afterwards
  6. Questions

1. What it is

transformers, diffusers, datasets and other libraries built on huggingface_hub download files from the Hugging Face Hub into one shared cache, so a model fetched by one script is reused by the next. Hugging Face’s documentation is plain about the catch: cached files are never deleted, and when you download a newer revision of a model, the previous files are kept in case you need them again.

2. Where it is

~/.cache/huggingface

That’s the default. HF_HOME moves the whole thing, HF_HUB_CACHE moves only hub, and HF_DATASETS_CACHE only the datasets cache. Inside each repository’s folder, blobs holds the actual files, snapshots has one folder of links per revision, and refs records which revision a branch such as main points to.

3. How big it gets

Model weights make up nearly all of it, and every revision you’ve downloaded counts. Hugging Face’s CLI lists each repository with its size and when you last used it, and can show revisions you haven’t touched in a while:

hf cache ls
hf cache ls --revisions --filter "accessed>30d"
du -sh ~/.cache/huggingface/*

Older installs without the hf command have huggingface-cli scan-cache for the same report.

4. How to delete it safely

Remove whole models or datasets you no longer use. hf cache rm asks before deleting, and --dry-run shows what would go:

hf cache rm model/<org>/<name> --dry-run
hf cache rm model/<org>/<name>

Then clear the leftovers. hf cache prune deletes revisions that no branch or tag points to any more, partial files from interrupted downloads, and shared files no cached repository uses:

hf cache prune

With older versions, huggingface-cli delete-cache opens a list where you tick what to remove.

The CLI is safer than Finder here. Recent versions store some files once, in a shared blobs folder at the top of hub, for every repository that uses them, and only hf cache rm and hf cache prune know when those can go. The xet folder is the exception: Hugging Face’s docs say you can remove it entirely to reclaim its space.

5. What happens afterwards

Questions

Can I delete the whole ~/.cache/huggingface folder?

You can, with no Python process using it, but you also delete your login token. Removing hub and datasets and keeping the rest gives back almost the same space without signing in again.

Why is the cache bigger than the models I use?

Every revision you’ve downloaded stays, and so do models from old experiments. hf cache ls --revisions shows them, and hf cache prune removes revisions nothing points to.

Does deleting the cache remove models I fine-tuned?

Not if you saved them to your own folder with save_pretrained(). Only files downloaded from the Hub live in the cache.

Is this the cache LM Studio and Ollama use?

No. LM Studio and Ollama keep their own copies of models, outside ~/.cache/huggingface.

How SiftMac handles it. Its AI files category lists each model folder in ~/.cache/huggingface/hub (models--org--name) with its size and when it last changed. Models are You decide and never ticked for you, and one you choose is removed straight away rather than kept on the Undo Shelf; datasets and the rest of the cache are left alone.

Download SiftMac · scanning is free, and so is your first 2 GB of cleaning · See how it works