I have various scripts for periodic cleanup operations:
- brew-clean
- nix-clean
- clean-sstate (makes assumptions about shared state paths)
- safari-webapp-cache-clean
- brew-clean-cask-pkgs
And other potential ones, like docker system prune and the like. Consolidate them into a wrapper structure of some sort, and integrate that with periodic cleanup operation services and launchd agents.
I'm leaning toward a clean or cleanup wrapper script which looks for scripts in a clean.d or cleanup.d folder by the script, but also git-like looks for clean-* or cleanup-* subscripts in the PATH to run. We can add commented header metadata to script files to use in service generation, if they have differing scheduling preferences, if worthwhile.
I have various scripts for periodic cleanup operations:
And other potential ones, like
docker system pruneand the like. Consolidate them into a wrapper structure of some sort, and integrate that with periodic cleanup operation services and launchd agents.I'm leaning toward a
cleanorcleanupwrapper script which looks for scripts in aclean.dorcleanup.dfolder by the script, but also git-like looks forclean-*orcleanup-*subscripts in thePATHto run. We can add commented header metadata to script files to use in service generation, if they have differing scheduling preferences, if worthwhile.