cd /news/developer-tools/how-i-reclaimed-47gb-on-my-macbook-b… · home topics developer-tools article
[ARTICLE · art-11160] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=· neutral

How I reclaimed 47GB on my MacBook by cleaning developer project junk

The article describes how a developer reclaimed 47GB of storage on their 512GB MacBook by manually deleting accumulated project junk, including 18GB from `node_modules` folders, 14GB from Unity Library folders, 9GB from Xcode DerivedData, and 6GB from Python virtualenvs. The author notes these files are safe to delete as they regenerate automatically, and provides terminal commands for manual cleanup. After the manual process, the author created a paid tool called PolySweeper ($14.99) that automates scanning and deleting these developer-specific files while running fully offline.

read2 min views23 publishedMay 23, 2026

Last week I ran out of disk space mid-deploy. That annoying "Your startup disk is almost full" notification. I had a 512GB MacBook and somehow had less than 8GB free.

So I started digging. What I found surprised me.

The culprits

Here's the breakdown of what was eating my storage:

node_modules — 18GB

Every JavaScript project has one. They're never small. A typical React project pulls in 300–500MB of dependencies. I had projects from 2021 I'd completely forgotten about — each one with an intact node_modules folder taking up space.

The good news: they're completely safe to delete. npm install

(or yarn

, or pnpm

) regenerates them instantly.

Unity Library folders — 14GB

If you've ever used Unity — even just for a game jam or a tutorial — your project has a Library folder. Unity uses it as a local cache for imported assets. It regenerates automatically when you open the project.

I found four old game jam projects I'd abandoned. Combined Library size: 14GB.

Xcode DerivedData — 9GB

Xcode stores build artifacts, indexes, and intermediate files in ~/Library/Developer/Xcode/DerivedData. It grows silently over time. Mine had build caches from apps I no longer maintain.

Safe to delete via Xcode → Preferences → Locations → DerivedData → arrow button. Or just nuke the folder directly.

Python virtualenvs — 6GB

Every python -m venv

or conda create

leaves behind an isolated environment with its own Python installation and packages. I had virtualenvs from tutorial projects dating back to 2020.

The fix

I went through each category manually this time. It took about 40 minutes and recovered 47GB.

After doing this, I built a tool to make it automatic: PolySweeper. It scans your Mac, finds all of these by category, shows the size, and lets you delete with a confirmation step. Runs fully offline — nothing leaves your machine.

If you want to do it manually, here's the quick version:

find ~ -name "node_modules" -type d -prune | xargs du -sh | sort -hr | head -20

find ~ -name "Library" -type d -path "*/Assets/../Library" | xargs du -sh 2>/dev/null

rm -rf ~/Library/Developer/Xcode/DerivedData

Worth running even if you think your disk is fine. Most developers I know have 10–40GB hiding in these folders.

If you want the automated version: PolySweeper — macOS disk cleaner built specifically for developers. One-time $14.99.

── more in #developer-tools 4 stories · sorted by recency
── more on @macbook 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-i-reclaimed-47gb…] indexed:0 read:2min 2026-05-23 ·