Show HN: Clean Your Mac with a Script
44 points| hkdobrev | 1 year ago |github.com
Pull requests are very welcome for other unused files to clean up storage space!
44 points| hkdobrev | 1 year ago |github.com
Pull requests are very welcome for other unused files to clean up storage space!
duskwuff|1 year ago
2) /tmp and /var/tmp are cleared on reboot. Clearing them manually is probably not worth the hassle.
3) A week is way too short as a default for DAYS_TO_KEEP. A more appropriate value might be on the order of 30 - 90 days.
4) brew doctor is purely a diagnostic tool; it doesn't perform any maintenance operations. It doesn't belong in this script.
antihero|1 year ago
cpursley|1 year ago
(in all seriousness folks, if you're gonna show HN, spend some time on your README, docs, etc).
antihero|1 year ago
The main issue I'm finding is that `find` seems extremely slow at deleting things.
seer|1 year ago
The ability to do that is actually quite powerful as both disaster recovery and getting new hardware - it is in my mind so much cleaner to just install everything again. The built in migration tools have always done too little or too much for my taste. Dotfiles feel just right.
Funny enough hkdobrev introduced me to this philosophy almost 15years ago which I still use to this day and try to spread wherever I am. Thank you!
[1] https://github.com/webpro/awesome-dotfiles
voidfunc|1 year ago
ryandrake|1 year ago
domoregood|1 year ago
https://applejack.sourceforge.io
Nowadays, Onyx (also free) tends to do the trick:
https://www.titanium-software.fr/en/onyx.html
Does this script close any gaps left by Onyx's MAINTENANCE routines?
CharlesW|1 year ago
chasil|1 year ago
Why is this written for bash, which isn't getting recent changes?
alsetmusic|1 year ago
Or, if the person is like me, they're more comfortable in Bash after years of it being the default. Hacking around in a less-familiar shell seems like a bad idea if it's optional when deleting data, regardless of what's currently the default. (I realize that zsh can execute commands with Bash syntax, that's not my point.)
Jiahang|1 year ago
rgbjoy|1 year ago
givemeethekeys|1 year ago
But hey, maybe my apps will be snappier?
If my 10 year old macbook doesn't see much improvement, I don't think a newer machine will see it either.
unknown|1 year ago
[deleted]