Where is the Hugging Face cache directory?

For the Hugging Face Hub, the documented default cache directory is ~/.cache/huggingface/hub. But the active location can be overridden, so inspect configuration and the cache itself before treating a folder as disposable.

Model files, local folders and archive media kept as distinct parts of one library.
Find the local data first; decide what to retain second.

Default path and documented overrides

The Hub cache stores downloaded model, dataset and Space repositories below its cache root. The default root is ~/.cache/huggingface/hub. Inside it, repositories are commonly named like models--organization--repository, with directories for blobs, snapshots and references.

Do not infer intent from the folder name. The same machine can hold a shared Hub cache, a project-specific cache and a deliberately curated model directory. They are not automatically interchangeable.

Inspect before you free anything

Use the Hugging Face CLI to see what its cache manager knows about the active cache. The documented hf cache ls command lists cached repositories, size and access information. If you have moved the cache, pair cache management commands with the corresponding cache directory option rather than assuming the default.

Before removing a snapshot, identify the project, runtime and revision that use it. A cache can contain more than the model file you have in mind, and a source tree or local inference workflow may rely on a cached revision that is not obvious from a file browser.

Cache cleanup versus long-term retention

The Hugging Face cache is optimized for avoiding unnecessary downloads. It is not automatically a long-term catalog of the model versions you want to preserve. If a group of completed model artifacts matters to your work, first decide what you need to recover later and keep an independent backup where appropriate.

Tensor Archive fits after that decision: it can preserve a related local family, verify it and restore a separate exact copy before you manually reclaim a redundant working copy. It does not replace Hugging Face’s own cache management or tell an active library where to download models.

A safe sequence

  1. Check whether HF_HUB_CACHE or HF_HOME changes the active location.
  2. List the cache through the Hugging Face tooling and identify the repositories you no longer need immediately.
  3. Keep or independently back up any model version that matters.
  4. For a completed related family, analyse it, archive it, verify it and restore a separate copy before manual reclamation.

Sources