跳到正文
DEV Community· Md Ayan bag·· 2 小時前AI 評分64

作者發現 AI 編碼工具在 Mac 佔用約 32 GB,Claude 佔 13 GB

AI Coding Tools Were Quietly Using 32 GB of My Mac. Claude Alone Took 13.

AI 導讀

作者檢查自己的 Mac 後發現,Claude、Codex、Cursor、Gemini 等 AI 工具合計佔用約 32 GB,其中 Claude 桌面版佔 13.08 GB。文章列出各工具的資料夾位置及清理注意事項,並提供兩條 du 命令檢查佔用空間最多的資料夾。快取和下載模型可重新下載,聊天資料和工作階段紀錄則應審慎處理。

正文

My MacBook told me its disk was almost full. 5.5 GB free out of 245 GB. My Pictures folder is 93 MB. My Documents folder is under 40 MB.

So where did 240 GB go?

macOS had an answer, sort of: "System Data", 147 GB. More than half the disk, in one grey bar, with no way to click into it.

I measured what was inside it, folder by folder. The surprise wasn't old caches or forgotten installers. It was the AI tools I use every day. Claude, Codex, Cursor, Gemini and a couple of local models were holding about 32 GB between them, and almost none of it shows up anywhere you'd think to look.

Later the same day, after a first cleanup: System Data is still 135.66 GB, 60% of a 245 GB disk

Why it all hides in "System Data"

macOS's Storage settings only name a few things: Apps, Documents, Photos, Mail, iCloud. Everything an app saves for itself lands in ~/Library/Application Support or in hidden folders in your home folder like ~/.codex and ~/.cache. macOS counts all of that as System Data.

AI tools are the heaviest users of exactly those places. They download runtimes, sandboxes and models, and they keep every session you've ever had.

Here's what I found on my Mac, measured with APFS clones counted once (so the numbers match what you'd actually get back):

  • Claude desktop app: 13.08 GB, of which 10.22 GB is one folder, vm_bundles
  • Gemini / Antigravity (~/.gemini): 5.31 GB
  • Codex (~/.codex): 3.6 GB, plus 1.99 GB of runtimes in ~/.cache/codex-runtimes
  • Cursor: 3.56 GB, mostly 2.83 GB in globalStorage
  • Claude Code (~/.claude): 2.8 GB, 2.61 GB of it old session transcripts
  • Hugging Face model cache: 952.8 MB
  • Whisper speech models: 628.9 MB

That's roughly 32 GB. On a 256 GB MacBook, that's one eighth of the disk.

My home folder as a treemap. The AI tools are the hidden dot-folders: .gemini, .codex, .claude and .cache. Personal folders renamed.

What each one is, and what's safe to delete

Claude desktop: ~/Library/Application Support/Claude
The 10 GB vm_bundles folder is the virtual machine image Claude uses to run tasks in a sandbox. People on Reddit and in Claude's GitHub issues report the same 10–13 GB. You can delete it with Claude quit, but if you use those features it downloads again. Cache and Code Cache (about 500 MB here) are safe to clear any time.

Claude Code: ~/.claude/projects
Every conversation is saved as a JSON file so you can resume it, and a single long session can pass 100 MB. Delete old project folders you'll never resume; you only lose the ability to pick those sessions back up.

Codex: ~/.codex and ~/.cache/codex-runtimes
Runtimes and packages Codex downloads to run code. The cache folder re-downloads when needed, so it's safe to clear if you're short on space today.

Gemini and Antigravity: ~/.gemini
Google's Antigravity IDE keeps its data and backups here. If you tried Antigravity once and moved on, this is easy space back. If you use it daily, leave it.

Cursor: ~/Library/Application Support/Cursor
Careful with this one. User/globalStorage holds Cursor's settings and chat history database, so don't delete it blindly. Old folders in User/workspaceStorage, for projects you've deleted, are safe to remove.

Hugging Face and Whisper: ~/.cache/huggingface and ~/.cache/whisper
Downloaded models. Delete the ones you don't use (huggingface-cli delete-cache lets you pick); anything you delete downloads again the next time a tool asks for it.

Check your own Mac in 30 seconds

du -sh ~/Library/Application\ Support/* 2>/dev/null | sort -h | tail -10
du -sh ~/.[!.]* 2>/dev/null | sort -h | tail -10

The first line shows the ten biggest app data folders. The second shows the ten biggest hidden folders in your home. If you use AI coding tools, I'd bet at least three of them are in those lists.

The rule I follow now

Caches and downloaded models are safe: they come back on their own. Anything that holds history (chat databases, session transcripts) is yours: decide it on purpose. And nothing gets deleted permanently on the first pass. It goes to the Trash first, so a mistake costs you nothing.

Tidy Mac's Smart Clean separates what regrows on its own from what's worth a look.

Full disclosure: I build Tidy Mac, the app in these screenshots, because I got tired of doing this with du every few weeks. It names what's inside System Data, including AI tools and developer caches, with sizes that match Disk Utility, and everything goes to the Trash with Undo. It's a one-time purchase, no subscription.

But you don't need it to fix this. The two commands above and ten minutes will find most of it. If you want to go deeper on any one folder, I wrote up what's in Application Support, the Hugging Face cache and what System Data really is.

If your Mac says it's full and you use Claude, Codex or Cursor, start with those folders. Mine had 32 GB waiting.

來源:DEV Community · dev.to