Developer guide

Where Ollama, Hugging Face and LM Studio keep models on a Mac, and how to delete them

Find where Ollama, Hugging Face and LM Studio keep models on your Mac, and delete the ones you no longer use.

3 safe1 careful2 never

updated read 4 minfor Ollama, Hugging Face hub (hf CLI) and LM Studio on macOS

The short answer

  1. 01

    Ollama: models are in ~/.ollama/models (or OLLAMA_MODELS). List with ollama ls, remove with ollama rm <name:tag>.

  2. 02

    Hugging Face: cache is ~/.cache/huggingface/hub. Use hf cache ls, rm and prune. Old revisions are never deleted automatically.

  3. 03

    LM Studio: models are in ~/.lmstudio/models/<publisher>/<model>. Delete them in the My Models tab.

  4. 04

    Uninstalling the apps keeps the models. The folders stay until you remove them.

  5. 05

    Use each tool's own command instead of deleting blob files by hand, because models share data.

Local model storageExample Mac. Sizes are illustrative.

Ollama

Storage path~/.ollama/modelsOr the folder in OLLAMA_MODELS. Holds blobs and manifests.

Listollama lsLists models with sizes. Removes nothing.
Delete llama3:8bollama rm llama3:8b
Delete mistral:7bollama rm mistral:7b
Delete qwen2.5:14bollama rm qwen2.5:14b

Removes: the manifest and the blobs no other model uses. Layers shared with another model stay, so the space freed can be smaller than listed. Do not delete files inside blobs by hand.

Hugging Face

Storage path~/.cache/huggingface/hubChange it with HF_HOME or HF_HUB_CACHE. Each repo is models--<org>--<name>.

Listhf cache lsLists cached repos. Add --revisions to see each revision. Removes nothing.
Preview delete Llama-3.1-8B-Instructhf cache rm model/meta-llama/Llama-3.1-8B-Instruct --dry-run
Preview delete Qwen2.5-7B-Instructhf cache rm model/Qwen/Qwen2.5-7B-Instruct --dry-run
Preview delete Mistral-7B-Instruct-v0.3hf cache rm model/mistralai/Mistral-7B-Instruct-v0.3 --dry-run

Removes: only the blobs that repo or revision alone uses. Run with --dry-run first, then again without it. Old revisions are never deleted automatically; hf cache prune removes unreferenced revisions and .incomplete downloads.

LM Studio

Storage path~/.lmstudio/modelsLaid out as <publisher>/<model>/<file>.gguf. Change the folder in the My Models tab.

Listlms lsLists what is on disk. lms unload only frees memory, not disk.
Delete Meta-Llama-3.1-8B-Instruct-GGUF~/.lmstudio/models/lmstudio-community/Meta-Llama-3.1-8B-Instruct-GGUFFolder to remove.
Delete Qwen2.5-7B-Instruct-GGUF~/.lmstudio/models/Qwen/Qwen2.5-7B-Instruct-GGUFFolder to remove.
Delete Mistral-7B-Instruct-v0.3-GGUF~/.lmstudio/models/lmstudio-community/Mistral-7B-Instruct-v0.3-GGUFFolder to remove.

How: delete the model in the My Models tab, or remove its folder in Finder. LM Studio's documentation does not describe a delete command.

AI coding tools

Storage path~/.claude, ~/.codex, ~/Library/Application Support/CursorNot models, but they grow too. Delete only the clearly regenerable parts.

Path~/.claude Safe to clean: old session transcripts in projects/ (deleted after 30 days by default, set by cleanupPeriodDays in settings.json). Keep: settings.json, CLAUDE.md, skills, plugins. Folder can move with CLAUDE_CONFIG_DIR.
Path~/.codex Safe to clean: old session logs under sessions. Keep: config.toml, auth.json, history.jsonl. Folder can move with CODEX_HOME.
Path~/Library/Application Support/Cursor Safe to clean: Cache, CachedData and GPUCache, which rebuild. Quit the editor first. Keep: settings, extensions and the live state database. This layout comes from observation, not vendor documentation, so check sizes first.
Where Ollama, Hugging Face, LM Studio and AI coding tools keep their data on a Mac, and the command that removes each item.

Where each tool keeps models

Local models are some of the largest files on a developer Mac, and none of these tools delete them for you. For disk usage across the whole Mac, see the guide to freeing disk space.

ToolDefault locationOverride
Ollama~/.ollama/modelsOLLAMA_MODELS
Hugging Face~/.cache/huggingface/hubHF_HOME, HF_HUB_CACHE
LM Studio~/.lmstudio/modelsSet in the My Models tab

Safe to delete?

ItemVerdictWhat you lose
A model you no longer useSafeThe download. You can pull it again, but large models take time and bandwidth.
Old Hugging Face revisions, .incomplete filesSafeSuperseded snapshots and failed downloads.
Hugging Face xet cacheSafeUpload shard cache. Hugging Face docs say it can be removed to reclaim space.
A model your scripts depend onCarefulYour tools fail until it is downloaded again.
Individual files inside blobs/NeverBlobs are shared between models and revisions. Deleting one can corrupt several.
Ollama or Hugging Face config, tokensNeverSettings and logins. Only delete models, not everything in the folder.

Ollama

ollama ls

Lists models with sizes. Removes nothing.

ollama rm llama3:8b

Removes that model (use your own name and tag). It deletes the manifest and blobs no other model uses, so layers shared with another model stay and the freed space can be smaller than listed.

To move models to another drive, set OLLAMA_MODELS. For the macOS app, Ollama's documentation says to set environment variables with launchctl, then restart Ollama. Its uninstall steps also list ~/.ollama, so removing the app alone leaves the models.

Hugging Face

Each repo is stored as models--<org>--<name> with blobs, snapshots (symlinks into blobs) and refs. Datasets and Spaces use datasets-- and spaces-- prefixes. Hugging Face never deletes cached files automatically, so old revisions pile up.

hf cache ls

Lists cached repos. Add --revisions to see each revision. Removes nothing.

hf cache rm <repo-or-revision> --dry-run

Previews what removing a repo or revision would free. Run it again without --dry-run to delete. Removing a revision deletes only the blobs that revision alone uses.

hf cache prune

Removes unreferenced revisions, .incomplete partial downloads and orphaned shared blobs.

The older huggingface-cli scan-cache and huggingface-cli delete-cache still work with deprecation warnings. MLX models download through the same hub, so they land in this cache.

LM Studio

LM Studio keeps files as ~/.lmstudio/models/<publisher>/<model>/<file>.gguf. You can change the folder in the My Models tab. Delete a model there, or remove its folder in Finder. lms ls lists what is on disk, but lms unload only frees memory, not disk. The documentation describes no delete command, so use the app.

Older guides mention ~/.cache/lm-studio/models, an earlier default. Check it if you have used LM Studio for a long time.

Do not delete files inside blobs directories by hand. Ollama and Hugging Face share blob files between models and revisions. Use ollama rm or hf cache rm so the manifests stay consistent.

AI coding tool data folders

Coding assistants also write local history. Delete only the clearly regenerable parts.

  • Claude Code. Data is in ~/.claude, or the folder in CLAUDE_CONFIG_DIR. Transcripts in projects/ are deleted after 30 days by default (cleanupPeriodDays in settings.json). Keep settings.json, CLAUDE.md, skills and plugins.
  • Codex. State is in ~/.codex or CODEX_HOME. Old logs under sessions can go. Keep config.toml, auth.json and history.jsonl.
  • Cursor. Chromium-style caches (Cache, CachedData, GPUCache) in ~/Library/Application Support/Cursor rebuild. Leave settings, extensions and the live state database. Quit the editor first.

The Cursor layout comes from observation, not vendor documentation, so check sizes before deleting.

One list of every model, sized by what you would free

Hoardless lists Ollama models one by one (Confirm tier) sized by the bytes only that model uses, and removes them with ollama rm. For Hugging Face it separates old revisions from the current one and moves exact snapshot folders to the Trash (Confirm), and clears unfinished downloads (Auto). LM Studio models are Confirm and go to the Trash. It also flags duplicate large model files across tools. Claude Code, Codex and Cursor leftovers are listed as Confirm or Auto items, and settings, auth and history files are never touched.

See Hoardless

Questions

Where does Ollama store models on a Mac?

In ~/.ollama/models, in blobs and manifests folders, unless OLLAMA_MODELS points elsewhere.

How do I delete an Ollama model?

Run ollama ls to see names, then ollama rm . It removes the manifest and any blobs no other model uses.

Does ollama rm free the full listed size?

Not always. Layers shared with other models stay, so the space freed can be less than ollama ls shows.

Where is the Hugging Face cache on a Mac?

At ~/.cache/huggingface/hub. HF_HOME or HF_HUB_CACHE changes it.

How do I delete Hugging Face models from the cache?

Run hf cache ls, then hf cache rm with the repo or revision. hf cache prune removes unreferenced revisions and partial downloads. The older huggingface-cli delete-cache still works but is the legacy command.

Why is my Hugging Face cache so big?

Hugging Face never deletes cached files on its own. When a new revision downloads, the previous files are kept.

How do I delete LM Studio models?

Remove them in the My Models tab, or delete the model's folder under ~/.lmstudio/models. lms unload only frees memory, not disk.

Does uninstalling Ollama or LM Studio delete the models?

No. ~/.ollama and the LM Studio models folder stay until you remove them.