Guide · AI models
Find and remove local AI models: Ollama, Hugging Face and LM Studio
Updated · Scott Havird
short answer
For Ollama, run ollama list and ollama rm <model>; don't delete files under ~/.ollama/models by hand. For Hugging Face, measure ~/.cache/huggingface/hub and remove the models--<org>--<name> folders you don't need, or use huggingface-cli delete-cache. LM Studio keeps models in ~/.lmstudio/models.
Where the weights live
| Tool | Default location | Notes |
|---|---|---|
| Ollama | ~/.ollama/models | Moved by OLLAMA_MODELS. Models share layers stored as blobs, so one blob can belong to several models. |
Hugging Face Hub (transformers, diffusers, huggingface_hub) | ~/.cache/huggingface/hub | Moved by HF_HOME or HF_HUB_CACHE. One folder per repo: models--org--name, datasets--…. |
| LM Studio | ~/.lmstudio/models | Older versions used ~/.cache/lm-studio/models. |
| PyTorch hub | ~/.cache/torch | Weights downloaded by torch.hub and torchvision. |
| OpenAI Whisper | ~/.cache/whisper | One file per model size. |
Every one of these is expensive to get back: nothing breaks if you delete a model, but using it again means downloading gigabytes.
Measure them by hand
ollama list # name, size, last modified
du -sh ~/.ollama/models
du -sh ~/.cache/huggingface/hub/* 2>/dev/null | sort -h
huggingface-cli scan-cache # size and last access per repo
du -sh ~/.lmstudio/models ~/.cache/torch ~/.cache/whisper 2>/dev/null
The sizes ollama list prints include layers shared with other models, so removing one model can free less than its listed size. The du of the whole folder is the real total.
Remove them safely by hand
ollama rm qwen2.5-coder:32b # removes the model and any layers no other model uses
huggingface-cli delete-cache # interactive picker of cached repos and revisions
rm -rf ~/.cache/huggingface/hub/models--org--name # or delete one repo folder directly
- Let Ollama delete its own files. Deleting blobs by hand can break other models that share them;
ollama rmonly removes layers nothing else references. - Newer Hugging Face releases rename the CLI. If
huggingface-cliis missing, the same cache commands live underhf cache;hf cache --helplists them. - LM Studio can delete models from its own model list, or you can remove a model's folder under
~/.lmstudio/modelswhile the app is closed. - Look at last use, not just size. A 40 GB model you use daily is worth keeping; a 9 GB one you tried once three months ago probably isn't.
How lysosome does it
lysosome caches --category ai_models # read-only: every model, size, last used
lysosome clean --caches --only 'ollama-model' --tier regenerable_expensive
# dry run: every Ollama model
lysosome clean --caches --only 'deepseek-r1:14b' --tier regenerable_expensive --yes
lysosome clean --caches --only 'hf-*' --tier regenerable_expensive --older-than 90d
# Hugging Face repos unused for 90+ days
lysosome lists Ollama models by name (not blob hashes), counting shared layers once, and removes them with ollama rm. Hugging Face repos are listed by repo name (honoring HF_HOME), LM Studio models by name, plus the PyTorch and Whisper caches; those folders are moved to the Trash. Models are tier regenerable_expensive, so a plain lysosome clean never touches them: you opt in with --tier regenerable_expensive and narrow with --only, which matches a model's name, kind or path and accepts globs.
The Mac app keeps a model library: every local model in one list with its size, last use and re-download cost.