# What fills a Mac that runs local models and AI coding tools

Who it’s for · Updated 21 November 2026. By Mohit Nippanikar, who makes SiftMac.

## The short answer

- **Models first, then history.** Downloaded models are usually the biggest files on an AI developer’s Mac, followed by coding agents’ session transcripts, editor caches and Python environments full of ML libraries.
- **What it costs you:** a deleted model has to be downloaded again, often several gigabytes. Caches cost nothing. Old sessions can’t be resumed once they’re gone.
- **Keep:** models you use, agent settings, skills and project memory, and the models macOS and Chrome manage themselves.

## 1. What fills an AI developer’s Mac

Most of it lands in hidden folders in your home folder, which is why the storage bar can’t name it. The usual parts:

| What | Where it lives | Comes back? | More |
| --- | --- | --- | --- |
| Ollama models | `~/.ollama/models`, or wherever `OLLAMA_MODELS` points | Only with `ollama pull` | [Ollama models](https://siftmac.com/safe-to-delete/ollama-models) |
| Hugging Face models and datasets, used by Transformers and MLX | `~/.cache/huggingface/hub` | Downloaded again on next use | [Hugging Face cache](https://siftmac.com/safe-to-delete/hugging-face-cache) |
| LM Studio models | `~/.lmstudio/models` | Downloaded again | [LM Studio models](https://siftmac.com/safe-to-delete/lm-studio-models) |
| PyTorch hub weights | `~/.cache/torch/hub` | Downloaded again | — |
| Claude Code sessions and old versions | `~/.claude/projects`, `~/.local/share/claude/versions` | Sessions no; old versions aren’t needed | [Claude Code’s folder](https://siftmac.com/safe-to-delete/claude-code-folder) |
| Codex sessions | `~/.codex/sessions`, `~/.codex/history.jsonl` | No | [Codex’s folder](https://siftmac.com/safe-to-delete/codex-folder) |
| Project chats in Cursor, Windsurf and Antigravity | `User/workspaceStorage` in each app’s Application Support folder | No | [AI files guide](https://siftmac.com/guides/ai-files-on-mac) |
| Editor caches and installed updates | `Cache`, `Code Cache`, `GPUCache` in each app’s folder; `~/Library/Caches/<app ID>.ShipIt` | Yes | [Cursor’s ShipIt](https://siftmac.com/safe-to-delete/cursor-update-cache), [extensions](https://siftmac.com/safe-to-delete/cursor-extensions) |
| ML Python environments | Each project’s `.venv`, conda environments | Yes, from the requirements file | [Python environments](https://siftmac.com/safe-to-delete/python-venv) |
| Apple Intelligence and Chrome’s Gemini Nano | `/System/Library/AssetsV2`, Chrome’s `OptGuideOnDeviceModel` | Managed by macOS and Chrome | [Chrome’s model](https://siftmac.com/safe-to-delete/chrome-on-device-ai-model) |

Measure each tool’s folder, biggest last:

```
du -sh ~/.ollama ~/.cache/huggingface ~/.lmstudio ~/.cache/torch ~/.claude ~/.codex ~/.gemini ~/.local/share/claude 2>/dev/null | sort -h
```

Then list the models themselves, with sizes, and the Hugging Face repos nobody has used for a month:

```
ollama ls
hf cache ls
hf cache ls --filter 'accessed>30d'
```

## 2. What’s safe to clear, and what to keep

### Models: remove with the tool, not Finder

- **Ollama** stores models as layers that several models can share, so deleting files by hand can break another model. `ollama rm <model>` removes one safely.
- **Hugging Face:** `hf cache rm model/<org>/<name>` deletes a repo, or a single file given as an `hf://` path; `hf cache prune` removes revisions no branch points to and half-finished downloads. Both take `--dry-run`.
- **LM Studio:** manage models from its My Models tab, where you can also choose a different models folder.
- **Keep big models off the internal disk:** point `OLLAMA_MODELS` for Ollama, and `HF_HOME` or `HF_HUB_CACHE` for Hugging Face, at a folder on an external SSD. [How to move them](https://siftmac.com/guides/move-ollama-models-to-external-drive).

### Sessions and history: yours to judge

- **Claude Code** deletes session transcripts older than `cleanupPeriodDays` (30 by default) in a background sweep after a session starts, so its folder trims itself unless you raised that setting. Sessions started in Claude Desktop or Cowork are kept at any age by default.
- **Codex** keeps its state in `~/.codex` (or `CODEX_HOME`). `max_bytes` under `[history]` in `config.toml` caps `history.jsonl`, and `persistence = 'none'` there stops saving it.
- **Cursor, Windsurf and Antigravity** keep each project’s chats in a `workspaceStorage` folder whose `workspace.json` names the project. Folders for projects you’ve deleted can go, with the editor quit.
- **Keep:** settings, credentials, skills, plugins and each project’s `memory` folder in `~/.claude`.

### Caches, and what to leave alone

- Electron caches in the Claude, Cursor, Windsurf and Antigravity folders, `~/.codex/cache` and the `.ShipIt` update folders all rebuild. Clear them with the apps quit.
- Apple Intelligence’s models are part of macOS: don’t delete them by hand ([why](https://siftmac.com/guides/apple-intelligence-storage)). Chrome’s Gemini Nano goes away for good only when you turn off On-device AI in Chrome’s settings.

## 3. How SiftMac helps an AI developer

SiftMac’s [AI files](https://siftmac.com/features/ai-files) category is built for this kind of Mac:

- **Models** from Ollama, Hugging Face and LM Studio are listed one by one with when you last used them, always **You decide** and never ticked for you. Ollama models are sized by the layers only they use and removed with `ollama rm`, so a shared layer is never broken.
- **Sessions** of Claude Code, Codex, Gemini CLI and Antigravity, project chats in Cursor, Windsurf and Antigravity, and the Claude app’s task scratch folders are listed after 7, 30 or 90 days untouched (your choice), never anything from the last day. They wait on the [Undo Shelf](https://siftmac.com/features/undo-shelf), and Claude Code’s `memory` folders are never touched.
- **Caches**, installed updates and older Claude Code versions are Safe. The newest version, and the one the `claude` command points to, always stays, and caches are cleared only while their app is closed.
- Apple Intelligence’s models and Chrome’s Gemini Nano are shown with their size, never removed.

It doesn’t clean `~/.cache/torch`, conda environments or Docker volumes. The [space map](https://siftmac.com/features/space-map) shows how big they are, and their own tools remove them.

## 4. A cleanup routine for an AI developer’s Mac

1. Run `ollama ls` and `hf cache ls`, and note the models you used this month.
2. Remove the rest with `ollama rm` and `hf cache rm`, then run `hf cache prune` for leftovers.
3. Move the models you keep to an external SSD if the internal disk is small.
4. Quit your editors and AI apps, then clear their caches and installed-update folders.
5. Look through agent history you won’t resume: old Codex sessions, chats of deleted projects.
6. Delete virtual environments of finished experiments, keeping each requirements file.
7. Check free space before the next big pull: models arrive several gigabytes at a time.

## Questions

### Can I just delete ~/.cache/huggingface?

You can, but everything in it downloads again the next time code asks for it, and the datasets in the same cache go too. `hf cache ls` and `hf cache rm` let you remove only the models you’re done with.

### Will deleting old Claude Code sessions break anything?

No. You lose the ability to resume or reread those sessions. Settings, `CLAUDE.md` files, skills and project memory are kept elsewhere and aren’t affected.

### Should I delete Apple Intelligence’s models to make room for my own?

No. macOS manages them and brings them back, and there’s no supported way to remove them by hand. Free space from your own models and caches instead.

## How SiftMac handles it

SiftMac lists each Ollama, Hugging Face and LM Studio model with when you last used it, old agent sessions after the age you choose, and AI apps’ caches; models are never ticked for you, and sessions wait 7 days on the Undo Shelf.

Download: https://siftmac.com/SiftMac.dmg (scanning is free, and so is the first 2 GB of cleaning).

## Sources

- [Ollama: FAQ (where models are stored, OLLAMA_MODELS)](https://docs.ollama.com/faq)
- [Ollama: CLI reference (ollama ls, ollama rm)](https://docs.ollama.com/cli)
- [Hugging Face: manage the huggingface_hub cache](https://huggingface.co/docs/huggingface_hub/guides/manage-cache)
- [LM Studio: download a model (models directory)](https://lmstudio.ai/docs/app/basics/download-model)
- [Claude Code: settings reference (cleanupPeriodDays)](https://code.claude.com/docs/en/settings-reference)
- [OpenAI Codex: advanced configuration (CODEX_HOME, history)](https://developers.openai.com/codex/config-advanced)
- [PyTorch: torch.hub download location](https://docs.pytorch.org/docs/stable/hub.html)

## Related

- [What Claude Code, Cursor, Ollama and Hugging Face leave on your Mac](https://siftmac.com/guides/ai-files-on-mac)
- [AI files: old chats, caches, updates and downloaded models](https://siftmac.com/features/ai-files)
- [Is it safe to delete Ollama models in ~/.ollama/models?](https://siftmac.com/safe-to-delete/ollama-models)
- [Is it safe to delete ~/.cache/huggingface?](https://siftmac.com/safe-to-delete/hugging-face-cache)
- [What fills a data scientist’s Mac: environments, caches and datasets](https://siftmac.com/for/data-scientists)

Canonical: https://siftmac.com/for/ai-developers
