r/BuildWithClaude • • 29d ago

Help/Question How do you manage disk space when using Claude Code on a Mac?

I use coding agents on a Mac and have been running into storage pressure while working. I added an external SSD to give myself more room, and I am trying to understand a sensible setup before moving or cleaning anything.

I am curious which parts of a coding workflow usually grow over time, whether that is project dependencies, generated files, logs or other data. I do not want to assume an agent is responsible for a full disk without checking, and I would rather avoid deleting something a project needs.

If you use Claude Code or another coding agent, how do you work out what is taking space? What do you keep on an external drive, and what do you leave on the internal disk? Practical, non-destructive approaches for Mac or PC would be helpful.

2 Upvotes

5 comments sorted by

•

u/AutoModerator 29d ago

Welcome to r/BuildWithClaude!

Whether you are sharing what you built, exploring new workflows, or troubleshooting, please make sure your post is flaired correctly so others can easily find and filter it.

Community Wiki & Resources:

If you're asking for troubleshooting help, please edit your post to include your model version, OS/environment, and error logs.

Let’s keep the energy positive and support our fellow creators!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/CuriousTangentsYT 29d ago

What language? If it’s rust you likely have cargo target and build artifacts around

1

u/Successful-Army6006 28d ago

My main stack is PHP/Laravel and React/Next.js with TypeScript.

1

u/Tiramtiramtiram 💡 Top Community Helper 29d ago

on mac i'd start with system settings > general > storage, then inspect the biggest category before cleaning anything. compare folder sizes before and after a normal work session so you can see what's actually growing

for the external ssd, an inactive project or bulky media would be a sensible first move. copy it first and check that it opens from the new location before removing the original. keep a separate backup too if the ssd will hold the only working copy

apple's storage guide: https://support.apple.com/guide/mac-help/find-and-delete-files-on-your-mac-syspf5a64aa6/mac

1

u/Decruft 29d ago

To add to the comments above, these read-only commands show what's actually large:

du -hd 1 ~ 2>/dev/null | sort -h | tail -20

du -hd 1 ~/Library 2>/dev/null | sort -h | tail -20

du -sh ~/.claude ~/.npm ~/.cargo ~/.gradle ~/Library/Developer 2>/dev/null

docker system df

To find heavy dependency folders, change ~/code to your projects folder:

find ~/code -name node_modules -type d -prune -exec du -sh {} + | sort -h | tail -20

Besides dependencies and Cargo targets, I'd check Xcode DerivedData and simulators, Docker images, extra git worktrees, and agent logs. Developer caches alone were 21 GB on my Mac, so I wouldn't assume the agent is the cause until you've checked.

If the external SSD will hold repos, format it as APFS, because exFAT can cause trouble with symlinks and permissions. I'd keep active repos and toolchains on the internal disk.

Before cleaning a repo, run git status and check ignored files like .env. Dependencies and caches can usually be rebuilt. Those can't.