dotfiles / macos_cleanup
AGENTS.md16 starsChanged 4 months agoMITView on GitHub
In this repository105 other files it gives its agents.
- ableton/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- aichat/AGENTS.mdAGENTS.md
- aider/AGENTS.mdAGENTS.md
- annepro2/AGENTS.mdAGENTS.md
- atuin/AGENTS.mdAGENTS.md
- btop/AGENTS.mdAGENTS.md
- chromium-vimium-extension/AGENTS.mdAGENTS.md
- claude-code/AGENTS.mdAGENTS.md
- codex/AGENTS.mdAGENTS.md
- contextMenu/AGENTS.mdAGENTS.md
- cron/AGENTS.mdAGENTS.md
- crush/AGENTS.mdAGENTS.md
- docker/AGENTS.mdAGENTS.md
- docker-logger/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- eqmac/AGENTS.mdAGENTS.md
- eza/AGENTS.mdAGENTS.md
- firefox-vimium-addon/AGENTS.mdAGENTS.md
- fork/AGENTS.mdAGENTS.md
- hammerspoon/AGENTS.mdAGENTS.md
- hermes/AGENTS.mdAGENTS.md
- heroic/AGENTS.mdAGENTS.md
- homebrew/AGENTS.mdAGENTS.md
- iina/AGENTS.mdAGENTS.md
- immich/AGENTS.mdAGENTS.md
- install/AGENTS.mdAGENTS.md
- iterm/AGENTS.mdAGENTS.md
- karabiner/AGENTS.mdAGENTS.md
- keyboard-layout/AGENTS.mdAGENTS.md
- lazydocker/AGENTS.mdAGENTS.md
- lazygit/AGENTS.mdAGENTS.md
- litellm/AGENTS.mdAGENTS.md
- macos/AGENTS.mdAGENTS.md
- macos_update/AGENTS.mdAGENTS.md
- marta/AGENTS.mdAGENTS.md
- mistral-vibe/AGENTS.mdAGENTS.md
- noti/AGENTS.mdAGENTS.md
- npm/AGENTS.mdAGENTS.md
- opencode/AGENTS.mdAGENTS.md
- python/AGENTS.mdAGENTS.md
- qdrant/AGENTS.mdAGENTS.md
- qwen-code/AGENTS.mdAGENTS.md
- rag/AGENTS.mdAGENTS.md
- rtk/AGENTS.mdAGENTS.md
- tmux/AGENTS.mdAGENTS.md
- uv/AGENTS.mdAGENTS.md
- voiceink/AGENTS.mdAGENTS.md
- vscode/AGENTS.mdAGENTS.md
- xcode/AGENTS.mdAGENTS.md
- zap/AGENTS.mdAGENTS.md
- zsh/AGENTS.mdAGENTS.md
- ableton/CLAUDE.mdCLAUDE.md
- aichat/CLAUDE.mdCLAUDE.md
- aider/CLAUDE.mdCLAUDE.md
- annepro2/CLAUDE.mdCLAUDE.md
- atuin/CLAUDE.mdCLAUDE.md
- btop/CLAUDE.mdCLAUDE.md
- chromium-vimium-extension/CLAUDE.mdCLAUDE.md
- claude-code/CLAUDE.mdCLAUDE.md
- The first 60 shown.
The file
We found no rules to list in this file: it reads as prose or reference rather than instructions.
Files
macos_cleanup — "where_is_my_space" macOS cache/junk cleanup scripts
cleanup_all.shis the entry point: flushes DNS, rebuilds zsh completion cache, sourcescleanup_targets.sh, then prunes Homebrew Caskroom installers, Docker, Trash, Atuin DB (VACUUM), and various app caches (GeForce NOW, Battle.net, Steam, DriveFS, GlobalProtect). SetAGGRESSIVE=truefor the extra section (go/npm/nuget/docker prune + per-repogit gc --aggressive).cleanup_targets.shis the declarative target list — mostlytry_clean/try_clean_patterncalls grouped (Caches / Gaming / Development / Applications / System / Patterns). The Patterns section deletes.DS_Store(singlefind ~pass, prunes Library/.Trash/node_modules/.git, 30stimeout) and.AppleDoublefiles.try_clean.shdefinestry_clean <dir> <label> [exclude]andtry_clean_pattern <base> <d|f> <pattern> <label>; both size-measure, skip missing/empty dirs, and report.helpers.shprovides the spinner (spinner_start/spinner_stop) andformat_size.broken_links.shdefinesreport_broken_links(called from the always-run "Dangling Symlinks" section): scans$HOME(pruningLibrary/node_modules/.git/.Trash/.cache/.npm) plus/opt/homebrew/{bin,sbin,etc}and/usr/local/binfor dangling symlinks (target deleted/renamed — e.g. a removed app's leftover link, or a renamed dotfiles target), usingfind … -type l ! -exec test -e {} \;. Report-only by default, flagging links into~/projects/dotfileswith[dotfiles]; setPRUNE_BROKEN_LINKS=truetormthem (a dangling symlink is pure junk). NB: "broken hardlinks" don't exist — a hardlink keeps the inode alive — so only symlinks are scanned.- Invariant: cleanup is destructive but conservative — missing/empty/running-app targets are skipped silently, never failed. Safety options:
setopt no_unset pipe_failat the top (a typo'd variable can never expand to "" inside an rm path);err_exitis deliberately NOT set, matching the skip-silently design. - Invoked three ways: locally via
up(alias →macos/update_all_and_cleanup_all.sh, which runsmacos_update/update_all.shthencleanup_all.shas child zsh processes — not sourced, so the safety setopts can't leak into the interactive shell); directly; or remotely viaclean.sh(curl bootstrap that downloads the five sourced scripts to a tmpdir and sourcescleanup_all.shwithCLEANUP_DIRset — safe there because the curl pipe runs in its own zsh process). It does its ownsudo -v;AGGRESSIVE=true upstill reaches it through the environment. - Relation to
macos_update/:update_all.shdoes package/tool updates (brew, npm, uv, docker, etc.); this dir does only deletion. They are independent —upchains update → cleanup. Files are tracked by the repoMakefile(not symlinked).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

