How to List the Models in Your Hugging Face Cache with hf cache ls
Every model, dataset and file you download from the Hugging Face Hub is kept in a cache on your computer, so the next run doesn't download it again. Over time that cache can grow to many gigabytes. hf cache ls lists what's in it. This guide downloads two small files and lists them, with huggingface_hub 2.5.0.
Syntax
hf cache ls [--revisions]
| Part | What it means |
|---|---|
hf cache ls | Lists every repository in the cache: its name, size, when it was last used and modified, and its refs |
--revisions | Lists each saved revision (commit) separately, with its commit hash |
The command-line guide says: "Use hf cache ls to inspect what is stored locally in your Hugging Face cache. By default it aggregates information by repository". The cache lives in ~/.cache/huggingface/hub unless you move it.
The Example
A small project downloads one file, config.json, from each of two well-known models, then lists the cache.
Prerequisites
- uv. This guide uses uv 0.13.10 with Python 3.15.2.
- An internet connection, to download from the Hub. No Hugging Face account is needed.
Step 1: Create a Project with the hf Command
uv init --python 3.15 cache-list
cd cache-list
uv add huggingface_hub
The huggingface_hub package is the library other Hugging Face libraries use to talk to the Hub, and it comes with the hf command. uv add installed version 2.5.0.
Step 2: Download Two Files
hf download downloads files from a model on the Hub into the cache and prints where each one went:
uv run hf download google-bert/bert-base-uncased config.json
uv run hf download distilbert/distilbert-base-uncased config.json
Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.
config.json: 100%|█████████████████████████████████████████████████| 570/570 [00:00<00:00, 1.59MB/s]
✓ Downloaded
path: /Users/you/.cache/huggingface/hub/models--google-bert--bert-base-uncased/snapshots/86b5e0934494bd15c9632b12f734a8a67f723594/config.json
Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.
config.json: 100%|█████████████████████████████████████████████████| 483/483 [00:00<00:00, 3.10MB/s]
✓ Downloaded
path: /Users/you/.cache/huggingface/hub/models--distilbert--distilbert-base-uncased/snapshots/12040accade4e8a0f71eabdb258fecc2e7e948be/config.json

The warning is a notice from the Hub itself: downloading without an account works, with lower rate limits. Each path shows how the cache is laid out: a models--<owner>--<name> folder per model, and inside it a snapshots/<commit> folder per revision.
Step 3: List the Cache
uv run hf cache ls
ID SIZE LAST_ACCESSED LAST_MODIFIED REFS
---------------------------------------- ----- ----------------- ----------------- ----
model/distilbert/distilbert-base-uncased 483.0 a few seconds ago a few seconds ago main
model/google-bert/bert-base-uncased 570.0 a few seconds ago a few seconds ago main
Found 2 repo(s) for a total of 2 revision(s) and 1.1K on disk.

| Column | What it shows |
|---|---|
ID | The repository type and name, such as model/google-bert/bert-base-uncased |
SIZE | Its size on disk: 570 bytes here, because only one small file was downloaded |
LAST_ACCESSED | When a file of it was last used |
LAST_MODIFIED | When it last changed in the cache |
REFS | The branch names that point at a saved revision, here main |
The last line adds it all up. Run it on a computer that has used Hugging Face for a while, and full models of hundreds of megabytes or several gigabytes show up here.
Step 4: List Every Revision
uv run hf cache ls --revisions
ID REVISION SIZE LAST_MODIFIED REFS
---------------------------------------- ---------------------------------------- ----- ----------------- ----
model/distilbert/distilbert-base-uncased 12040accade4e8a0f71eabdb258fecc2e7e948be 483.0 a few seconds ago main
model/google-bert/bert-base-uncased 86b5e0934494bd15c9632b12f734a8a67f723594 570.0 a few seconds ago main
Found 2 repo(s) for a total of 2 revision(s) and 1.1K on disk.

Each row is now one revision, with its full commit hash, the same hash as the snapshots folder in Step 2. When a model is updated on the Hub and you download it again, the old revision stays in the cache next to the new one, and this view shows both. The commands work unchanged in PowerShell.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
Running hf outside the project, without uv run | The shell can't find the command, unless it's installed globally | Run it from the project with uv run hf … |
Expecting models saved with save_pretrained("folder") to show up | hf cache ls lists only the Hub cache, not folders you saved yourself | Look in the folder you saved to |
Using the old huggingface-cli scan-cache command from older guides | The commands now live under hf cache | Use hf cache ls |
FAQ
How do I free up the space?
Remove a repository with hf cache rm, for example hf cache rm model/google-bert/bert-base-uncased. It asks before deleting anything.
Where exactly is the cache on Windows?
In C:\Users\<you>\.cache\huggingface\hub, the Transformers documentation says. Set HF_HOME to move it.
Conclusion
hf cache ls listed the two models with their sizes, and --revisions showed the commit hash of each saved revision. It's the quickest way to see what Hugging Face has stored on your disk.
Additional Resources
- Understand caching — how the cache is laid out.
- hf cache — every cache command.
