Pull requests are very welcome for other unused files to clean up storage space!
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.
(in all seriousness folks, if you're gonna show HN, spend some time on your README, docs, etc).
The main issue I'm finding is that `find` seems extremely slow at deleting things.
The script is clean and straightforward.
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!
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?
Why is this written for bash, which isn't getting recent changes?
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.)
When this is done, it will run in all the shells, because the script becomes POSIX-compliant.
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.