Purplelink
← All guides

What AI tools leave on your Mac, and what is safe to delete

AI coding tools, local models and the package managers behind them keep files that nothing ever cleans up. On the Mac I use every day they added up to about 10.5 GB, half of the 21 GB the disk has free. Here is where each one lives, how to measure it, and what is safe to remove.

Disclosure up front: I make Legroom, a Mac app that finds and cleans disk space, and it is mentioned near the end. Every number below is from my own Mac (Apple silicon, macOS 27.2, a 245 GB disk with 21 GB free), measured on October 11, 2026 with du, in decimal gigabytes as Finder shows them. It is one machine, so yours will differ.

What I found

Eight folders held 10.52 GB between them. None of it is a model: Ollama and Hugging Face were empty here. It is logs, build output and package downloads that tools write and never remove. Sorted by size:

WhatWhereSize hereSafe to delete?How
Xcode DerivedData~/Library/Developer/Xcode/DerivedData2.05 GBYes. Xcode rebuilds it. Quit Xcode first.rm -rf ~/Library/Developer/Xcode/DerivedData/*
Claude Code session logs~/.claude/projects2.00 GBYes. You lose the ability to resume those sessions. Keep settings.json and CLAUDE.md, which are not in this folder.delete project folders you no longer need
Docker Desktop data~/Library/Containers/com.docker.docker1.72 GBThrough Docker only.docker system prune
Claude desktop app data~/Library/Application Support/Claude1.48 GBI measured the size and did not look inside. Clear things from the app, not the folder.use the app's own settings
npm cache~/.npm1.41 GBYes. Packages download again when needed.npm cache clean --force
uv cache~/.cache/uv1.36 GBYes. Packages download again when needed.uv cache clean
Homebrew downloads~/Library/Caches/Homebrew0.29 GBYes.brew cleanup
pip cache~/Library/Caches/pip0.21 GBYes.pip cache purge

To measure your own, paste one line into Terminal, for example du -sh ~/.claude/projects ~/.npm ~/.cache/uv ~/Library/Developer/Xcode/DerivedData. Terminal reports in binary units, so its numbers run about 7% lower than Finder's for the same folder.

AI coding tools

Claude Code. It writes one log file per session under ~/.claude/projects, in a folder named for each project. On this Mac that was 20 project folders and 2.00 GB. The logs let you resume a conversation, so deleting a project's folder only costs you that history. Instructions you wrote, such as a CLAUDE.md file, and the settings file are not in projects.

Claude desktop app. Its data folder was 1.48 GB. I did not open it to see what each part is for, so I cannot tell you which parts are safe. Clear history or cache from inside the app, and quit it before touching the folder.

Not on this Mac, so not measured: Cursor, Windsurf, LM Studio and the ChatGPT desktop app. Each keeps its data under ~/Library/Application Support or in its own models folder, and each shows its size in Finder. Check them before assuming they are small.

Local models

Ollama keeps models in ~/.ollama/models, and ollama list shows each one with its size; remove one with ollama rm and its name. Hugging Face tools cache downloads under ~/.cache/huggingface, and huggingface-cli scan-cache lists what is there, with huggingface-cli delete-cache to remove revisions. Mine held 0 bytes, so I have no measurement to offer, and a single model is commonly several gigabytes.

The package managers behind them

Python and JavaScript tools install through uv, pip and npm, and each keeps every package it ever downloaded. Here that was 1.36 GB for uv, 1.41 GB for npm and 0.21 GB for pip. Homebrew adds 0.29 GB of old downloads. All four are caches: clearing them costs you a re-download the next time you install something, and nothing else.

Docker and Xcode are the two largest items outside the AI tools themselves. Docker's data (1.72 GB here) should be cleaned with docker system prune rather than by deleting the folder. Xcode's DerivedData (2.05 GB) is the biggest single folder on the list and is the safest: it is build output.

What Legroom does here, and what it does not

Legroom's Space Map shows where the space on your disk is, and a cleaning rule can point at any folder you choose, with a preview of what it would remove and your approval before anything goes to the Trash or is deleted. It recommends known caches such as Xcode DerivedData, Homebrew downloads and the npm cache. Today it has no built-in rules for Claude Code logs, Ollama or Hugging Face folders, so for those you would add a folder rule yourself. It is $9.99 once after a 7-day trial; the full details are on its page.

You do not need it for any of this. Every command above is free, and the Terminal line measures what you have.

Frequently asked

Is it safe to delete ~/.claude/projects?

Yes, with one cost. That folder holds the session logs Claude Code writes so you can resume a conversation. Deleting old ones frees the space and removes the ability to resume those sessions. Your settings and instructions live elsewhere in ~/.claude and are not in projects.

Is it safe to delete Docker's data?

Only through Docker. Run docker system prune to remove stopped containers, unused networks and dangling images; it leaves volumes alone unless you add --volumes, and that flag deletes data you may need. Do not delete the Containers folder by hand while Docker Desktop is installed.

Will deleting Xcode's DerivedData break my projects?

No. DerivedData holds build products and indexes that Xcode regenerates, so the next build is slower and nothing is lost. Quit Xcode first.

Do local models take much space?

They can. On this Mac Ollama and Hugging Face were empty, so I measured nothing. A single model download is commonly several gigabytes, and ollama list and huggingface-cli scan-cache show exactly what yours hold.

Related guides