Key points
- Default root: ~/.cache/huggingface, not ~/Library/Caches or the current project folder.
- Models live in hub/models--<org>--<name>, with blobs for data, snapshots for revisions, and refs for branch pointers.
- huggingface-cli env prints the active cache paths; scan-cache lists repositories and sizes.
- HF_HOME moves the whole cache, while HF_HUB_CACHE moves only the model hub.
- Deleted models must be downloaded again, and removing the cache root also removes the saved access token.
On macOS, the Hugging Face cache is ~/.cache/huggingface, not ~/Library/Caches. Model weights go under hub/, datasets under datasets/, and some library files under transformers/. It is separate from Ollama’s ~/.ollama/models. Measure it before deleting, because every model you remove has to be downloaded again.
The default location
~/.cache/huggingface
The model hub is the largest part:
~/.cache/huggingface/hub
Inside it, each repository gets a folder named models--<org>--<name>. That folder contains:
blobs/— the actual file contents, addressed by digestsnapshots/— per-revision directories with symlinks intoblobsrefs/— pointers from branch names to revision hashes
Because snapshots are symlinks, several revisions of the same model can share blobs. This is why deleting one snapshot directory may not free as much as expected; the underlying blobs remain until no reference needs them. The cache CLI handles this bookkeeping better than manual deletion.
The root also holds small metadata and, by default, the saved access token. Deleting the entire ~/.cache/huggingface folder removes that token along with the models, so you will need to log in again for gated repositories.
Confirm the active path
If huggingface-cli is installed:
huggingface-cli env
The output includes HF_HUB_CACHE and related cache paths. The location may differ from the default if HF_HOME or XDG_CACHE_HOME is set. Measure the folders:
du -sh ~/.cache/huggingface
du -sh ~/.cache/huggingface/hub
du -sh ~/.cache/huggingface/hub/models--* | sort -hr | head -20
du reports allocated disk blocks, which is the number that matters for free space. Finder does not show the folder by default because it is hidden; press Shift-Command-G and paste the path to browse it.
Inspect before deleting
huggingface-cli scan-cache
The scan lists repository IDs, sizes, last access times and revisions. In newer versions of the library, the hf CLI provides the same function:
hf cache scan
Use this output to decide which models you actually use. A model downloaded once for an experiment can be several gigabytes, and old revisions can multiply that.
Delete unused models and datasets
Interactive cleanup is the safest option:
huggingface-cli delete-cache
The newer equivalent is hf cache delete. Both let you select repositories or revisions rather than deleting blindly.
You can also remove a repository directory directly:
rm -rf ~/.cache/huggingface/hub/models--org--name
Do this only while no download, training job or inference server is using the model. Removing datasets/ and transformers/ is also fine when you no longer need those caches; both are rebuilt on demand. Avoid deleting individual files inside snapshots/, because that breaks the link structure for a revision.
If a repository is gated and requires approval, re-downloading it may involve more than waiting: you may need to be signed in with an account that still has access. Keep that in mind before deleting large gated models.
Move the cache to another drive
Set HF_HOME before Python starts:
export HF_HOME=/Volumes/External/hf
HF_HOME is the cache root; the hub, datasets and other caches are created under it. If you only want to move model weights, set HF_HUB_CACHE instead. Add the export to ~/.zshrc for shell sessions.
Changing the variable does not move existing files. Stop any process using the cache, move the folder to the new location, and verify that the new path works. Apps launched from the Dock do not inherit shell exports, so a GUI tool may need the variable set at login or in its own environment settings.
If you work offline, HF_HUB_OFFLINE=1 prevents the library from trying to reach the Hub, but it does not change where files are stored.
Avoid duplicate downloads
- Pin a revision when reproducibility matters, instead of downloading every new commit.
- Reuse one cache across projects rather than downloading into each project directory.
- Use
local_files_only=Truewhen the model is already cached and the network is slow. - Prefer smaller or quantized models for experiments.
- Delete old revisions through the cache CLI so unused blobs are actually released.
- If you also run Ollama, check
~/.ollama/modelsseparately; the two tools do not share weights.
Downloading with --local-dir creates a separate copy outside the cache. That copy is not managed by the cache cleanup tools, so use it deliberately and remove it when the project ends.
How Maclean handles Hugging Face storage
Maclean scans the Hugging Face hub, datasets and transformers caches as part of its developer-cache pass. Individual model repositories above a small size threshold are listed separately and labeled as requiring a re-download; the dataset and transformers caches are treated as regenerable.
maclean scan --tab dev-cache
maclean clean --tab dev-cache --dry-run
Developer-cache tabs delete permanently in the CLI, so review the dry run before confirming. Large files and duplicates use the Trash and can be restored with maclean restore <id>. The app adds a visual review and a 14-day trial; the CLI is free and open source under Apache-2.0.
For the other local model store, see where Ollama stores models. For general developer space, see node_modules disk space.
Bottom line
The cache is at ~/.cache/huggingface, with models in hub/ and datasets in datasets/. Confirm the path, measure the repositories, and delete unused ones with the cache CLI so shared blobs are cleaned correctly. Move it with HF_HOME before the next download if the internal disk is tight.