# How to Free Disk Space from Docker, OrbStack & Local AI Models on Mac

> Container runtimes (Docker Desktop’s Docker.raw, OrbStack’s data.img, Colima, Lima, Podman) and local AI weights (Ollama, Hugging Face Hub, LM Studio, PyTorch, Whisper, MLX) are often the single biggest consumers of Mac SSD space — easily 50–150 GB. Prune dangling images inside Docker first, and never manually delete Ollama blob files without checking shared manifest references.

- **Canonical URL**: https://cruft.app/guides/clean-docker-ollama-ai-models-mac
- **Category**: Backend & AI
- **Typical Reclaimable Space**: 20–150+ GB
- **Last Updated**: 2026-12-04

## Quick Facts

- **Typical reclaimable space**: 20–150+ GB
- **Container virtual disks**: Docker.raw, OrbStack data.img, Colima/Lima, Podman machine
- **Local AI model stores**: ~/.ollama/models, ~/.cache/huggingface/hub, ~/.lmstudio/models
- **Critical Ollama caveat**: Multiple model tags share blob hashes — deleting raw blobs breaks other models

## Exact macOS Paths & Safety Reference

| Location | macOS Path | Typical Size | Safety | Rebuild / Effect |
| --- | --- | --- | --- | --- |
| Docker Desktop Virtual Disk | `~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw` | 15–80 GB | Review | Deleting resets all local images, containers & volumes. Quit Docker first or prune via CLI. |
| OrbStack Disk & Caches | `~/Library/Group Containers/HUAQ24HBR6.dev.orbstack/data/data.img` | 10–60 GB | Review | Holds OrbStack containers, images, and Linux VMs; logs and MacVirt cache regenerate safely. |
| Colima, Lima & Podman Machines | `~/.colima/_lima, ~/.lima & ~/.local/share/containers/podman/machine` | 5–40 GB | Review | VM instances hold containers/volumes (Review); _cache base Linux images re-download cleanly. |
| Ollama Models & Orphaned Blobs | `~/.ollama/models (or $OLLAMA_MODELS)` | 4–70 GB per model | Re-download | Re-pull anytime with ollama pull <model>. Interrupted partial blobs regenerate safely. |
| Hugging Face Hub & Xet Cache | `~/.cache/huggingface/{hub,xet} (or $HF_HOME)` | 5–80 GB | Re-download | Models, datasets, and spaces re-download automatically on next load. |
| LM Studio Local Models | `~/.lmstudio/models & ~/.cache/lm-studio/models` | 4–60 GB | Re-download | Re-download quantized GGUF/MLX models from LM Studio. |
| PyTorch, Whisper, MLX, llama.cpp & Core ML | `~/.cache/{torch,whisper,clip,llama.cpp,mlx} & ~/Library/Caches/com.apple.CoreML` | 2–30 GB | Re-download | Model weights re-download; Torch Inductor and Core ML compiled caches rebuild automatically. |

## 1. Shrink Docker Desktop, OrbStack, Colima & Podman storage

Docker Desktop stores every image layer, build cache, container filesystem, and volume inside a single sparse disk file (Docker.raw). Even after deleting containers, buildx caches and dangling image layers keep the virtual disk huge.

Start by pruning unused images and build caches through Docker while it's running. Only delete Docker.raw or OrbStack's data.img directly when you want a clean slate and have quit the runtime completely.

**Inspect and prune unused Docker images & build cache**

```sh
docker system df
docker builder prune -a
docker image prune -a
```

> Note: Avoid adding --volumes unless you are certain no local database volume holds data you need.

## 2. Remove Ollama models without corrupting shared blobs

A single 70B quantized model can consume 40+ GB, and trying three or four variants quickly fills a 512 GB SSD. Inside ~/.ollama/models, manifests point to SHA-256 weight files under blobs/ — and multiple tags frequently share the exact same base weight or template blobs.

Never delete random files inside ~/.ollama/models/blobs manually. Use ollama rm <model> (or a tool like Cruft that reference-counts every manifest's layer digests before deleting exclusive blobs and unreferenced partial downloads).

**List and remove unused Ollama models via CLI**

```sh
ollama list
ollama rm llama3.3:70b
```

## 3. Clean Hugging Face Hub, LM Studio, PyTorch & MLX caches

Hugging Face stores downloaded checkpoints under ~/.cache/huggingface/hub using encoded folder names like models--meta-llama--Llama-3.1-8B-Instruct, alongside datasets--* and the newer ~/.cache/huggingface/xet cache. LM Studio saves models under ~/.lmstudio/models/<publisher>/<repo>.

Meanwhile, PyTorch Hub weights (~/.cache/torch/hub), compiled Inductor kernels (~/.cache/torch/inductor), OpenAI Whisper weights (~/.cache/whisper), llama.cpp, MLX (~/.cache/mlx), and Core ML compiled neural-engine caches quietly accumulate gigabytes across experiments.

**Check sizes of Hugging Face, LM Studio & ML caches**

```sh
du -sh ~/.cache/huggingface/hub/* ~/.lmstudio/models/*/* ~/.cache/{torch,whisper,mlx,llama.cpp} 2>/dev/null | sort -hr
```

## How Cruft Automates This Safely

- Parses Ollama manifests and reference-counts every blob digest so removing one model never breaks another tag — and separately detects orphaned partial downloads in blobs/.
- Decodes Hugging Face models--org--repo names into readable org/repo entries with last-used timestamps alongside LM Studio, PyTorch, Whisper, llama.cpp, MLX, and Core ML.
- Locks running Docker Desktop, OrbStack, Colima, Lima, Podman, and Ollama daemons so active disks can't be deleted mid-run.

Download Cruft free to scan (https://updates.cruft.app/Cruft.dmg) or buy a lifetime 3-Mac license for €15 once (https://license.cruft.app/buy).

## Frequently Asked Questions

### Why doesn't Docker.raw shrink after I delete containers?

Docker.raw is a virtual disk image allocated inside macOS's virtualization layer. Deleting stopped containers doesn't automatically prune BuildKit cache layers or unused base images, and reclaiming sparse blocks requires running docker builder prune / docker image prune (or resetting the disk while Docker Desktop is quit).

### Where does Ollama store models on macOS?

By default Ollama stores model manifests and SHA-256 weight blobs in ~/.ollama/models (or the directory set by the OLLAMA_MODELS environment variable).

### Is it safe to delete ~/.cache/huggingface/hub?

Yes — everything in ~/.cache/huggingface/hub is a local cache of models, datasets, or Spaces hosted on Hugging Face. Deleting unused model folders frees space immediately, and Python/transformers will re-download a model if your code loads it again.
