Ollama storage
Ollama documents ~/.ollama/models as the default model location on macOS. The OLLAMA_MODELS environment variable can move that store, so a scanner should respect the configured location instead of assuming only the default path.
Use Ollama’s own model inventory to understand model names and reported sizes. Do not delete arbitrary internal blobs while the service is using them. Removing a named model through the tool preserves the tool’s own bookkeeping and makes the consequence clear: the model must be pulled or imported again before use.
Hugging Face cache
The default Hub cache is ~/.cache/huggingface/hub, unless HF_HOME or HF_HUB_CACHE changes it. Repositories store file content in a shared blobs area while snapshots reference those blobs with symlinks. Adding the apparent size of every snapshot can therefore overstate physical disk use.
Hugging Face provides hf cache ls to inspect repositories and revisions and supports filters for size and access time. Its cache API can prepare a deletion strategy and report expected freed space before execution.
A safe review sequence
- Identify the tool and its configured storage root.
- Use the tool’s inventory to map physical data to model or revision names.
- Check whether a model is loaded or actively used.
- Estimate actual freed space without double-counting shared blobs.
- Record the download or import cost before removal.
SpaceLint reports Ollama’s model inventory and Hugging Face cache structure separately. Ambiguous shared data remains protected instead of being labeled as generic cache.