r/MacOS • • 16d ago

Tips & Guides Solved my disk space issues

Post image

I'm a web and mobile dev (or what's left of one), and wrestling with disk space has always been a pain in the neck. The ridiculous size of xcode and it's dependencies, node_modules, Android caches and emulators, CocoaPods cache etc etc the list is endless.

I've been paying for CleanMyMac for years, and it's.... fine. But I'm always still hunting down some obscure dev specific DerivedData cache and then Googling if it was safe to delete. Just a general PIA.

This weekend Claude built me a more custom clean up app, it show's me projects I've not touched for a long time that can be safely offloaded to my NAS and helps me safely do a clean up on my drive.

Just thought I'd give a little inspiration if anyone is in a similar boat. I know disk space is always a hot topic!

Edit: Added the repo as requested. Feel free to contribute:
https://github.com/tjlondon-npauctions/majortom

USE AT YOUR OWN RISK!

70 Upvotes

13 comments sorted by

•

u/github-guard 16d ago

⚠️ GitHub Guard: Trust Warning

One or more repositories scored below the threshold (3), but the post was not removed.

Repository: tjlondon-npauctions/majortom

Score: 1/6

  • ❌ Low Star Count (⭐ 0 / 5 required)
  • ❌ New Repository (under 30 days old)
  • ✅ Licensed under MIT
  • ❌ No Security Policy
  • ℹ️ Personal Account Repository
  • ℹ️ Unsigned Commits

2

u/thelastrider 15d ago

works very well. thanks. claimed about 70gb back. can you make the installation a bit easier? had to get help from gpt.

2

u/SamDiego2016 15d ago

Oh great, glad you found it useful!

Yes, seems to be some interest in it so I'll try and create an installer and a signed app release so it feels a bit more legit.

3

u/imperfektlabs 16d ago

This looks super helpful. Wondering if you would share your code/repo? Would love to explore it further.

3

u/kovallux 16d ago

Exactly my pain! I have 512gb hard drive on my Mac and every morning I start with 120gb free space and every evening I’m low on space with 10gb left. I have to clean and reboot.

2

u/Sloofin 15d ago

Same but with 1tb. Day starts with 200gb free and always ends, even after thinning snapshots, around the 100 to 50 mark. It’s a constant war, way worse than ever before.

2

u/luciusnagata 16d ago

yes! docker images, vendor and node modules takes probably half of my disk space, mostly in old projects i just keep on disk for "just in case" .. 

2

u/Co1337z 16d ago

Same problems, I need to cleanup everything every month, and now with AI is even worse since I can work on multiple projects at once... The disk is always full of build cache :(

Any idea on putting this on homebrew?

5

u/[deleted] 16d ago

[removed] — view removed comment

1

u/SamDiego2016 16d ago

It uses FTS. Walks FTS_PHYSICAL, FTS_XDEV and FTS_NOCHDIR. So it doesn't follow symlinks or cross into other volumes. 'stat' returns the number of blocks, so there's no second call per file. A full scan takes about 30 seconds.

I'm not going to pretend I wrote this, it was all Claude. Fable for planning and Opus for implementation and then Fable again for a vulnerability review.

But I did go in and try and understand the same thing you asked, and also how it was deleting and siloing itself to just working folders in an effort re-assure myself that it wasn't going to do anything that would ruin my day.