Why My Mac Suddenly Ran Out of Space — And How I Freed 100GB in Minutes

🧩 The Problem
It started with a simple warning.
“Your disk is almost full.”
At first, I ignored it.
I have a 494 GB SSD, and I wasn’t storing any large files — no movies, no huge downloads.
But suddenly, my Mac started behaving strangely:
Apps became slow
Builds took longer
Even Chrome started lagging
So I checked the storage…
👉 And I was shocked.
“System Data: 345 GB”
🤯 The Confusion
What is System Data anyway?
I didn’t install anything big.
No large apps. No heavy files.
Still, somehow most of my disk was gone.
macOS didn’t give any clear breakdown.
So I had to investigate manually.
🔍 The Investigation
I opened Terminal and ran:
du -h -d 1 ~ | sort -hr | head -15
And then… I found it.
137G /Users/mddelwar/.pm2
👉 A hidden folder was taking 137 GB
💣 The Real Culprit
The folder was created by PM2 — a tool I use to run Node.js apps.
Inside it?
👉 Logs. Lots of logs.
PM2 keeps writing logs continuously…
But it never cleans them automatically.
So over time, it silently grew to:
👉 137 GB 😐
⚡ The Fix (Took 5 Seconds)
To clear everything, I ran:
pm2 flush
And just like that…
💥 Over 100 GB of space was freed instantly
🛡️ Prevent This in Future
I installed log rotation:
pm2 install pm2-logrotate
pm2 set pm2-logrotate:retain 7
Now logs won’t grow uncontrollably anymore.
🧹 Bonus Cleanup (Optional)
While investigating, I also found other space-heavy folders:
~/Library → caches & app data
.npm → package cache
.gradle → build cache
You can clean them safely:
npm cache clean --force
rm -rf ~/.gradle/caches
rm -rf ~/.cache/*
🧠 Key Takeaways
“System Data” is often misleading
Hidden developer tools can consume huge space
Logs are silent killers
Always check hidden folders (~/.something)
🚀 Final Thought
If your Mac suddenly runs out of space…
👉 Don’t panic
👉 Don’t blame macOS
Instead, check this:
du -h -d 1 ~ | sort -hr | head -10
You might find your own 137GB surprise 😄
Comments (0)
Login to leave a comment.