Recipes

Automate Mac cleanup without writing a cron job

Recipes turn the cleanup you repeat every week into routines Room Service runs on a schedule, with a fresh scan before every run and an approval step for anything that is not plainly safe.

Recipes turn the cleanup you repeat every week into routines Room Service runs on a schedule, with a fresh scan before every run and an approval step for anything that is not plainly safe.

Recipes turn the cleanup you repeat every week into routines Room Service runs on a schedule, with a fresh scan before every run and an approval step for anything that is not plainly safe.

Recipes in Room Service

Every few weeks the same thing happens. DerivedData has filled up again, ~/.npm and Homebrew’s cache have grown, and JetBrains still keeps logs from a project you finished in spring. The usual fix is a cron job with rm -rf in it: no age rule, no record of what went, no way to say “keep the newest archive of each app”.

Room Service answers “automate mac cleanup” with Recipes. A recipe is a list of tasks, each with a target, a rule (older than N days, or keep the latest N), a schedule, a destination (Trash or permanent), and what happens when it is due: clean, notify, or ask you first.

Repeatable cleanup, scheduled and reviewed

Built-in recipes for developer caches. Four ship turned off: Xcode (old DerivedData, old Archives, keep the latest Archives), Package Caches (Homebrew, npm, SwiftPM, CocoaPods), IDE Caches (JetBrains, VS Code, Cursor, Windsurf, Android Studio, and more), and Browser Caches (Chrome, Brave, Edge, Opera, Firefox).

Custom recipes from any cleanup target. Pick from the catalog: Xcode Device Support, Yarn, pnpm, pip, Cargo, Gradle, Playwright, node_modules, virtualenvs, Ollama models, Android system images, Unity caches, Downloads, iPhone backups, and merged agent worktrees, which matches only worktrees that are merged, clean, and idle for three days. Or open Add to Recipe on any row in Cleanup.

Rules, not just rm. Age is read from a folder’s content, so a cache you use daily never looks old. Keep-latest counts per app for Xcode archives and per device for iPhone backups, and the newest of each is always kept.

Schedules that fit a developer week. Manual only, on app launch (once a day), every minute, every N hours, daily, weekly, or monthly. Room Service checks for due tasks every minute while it is running. Launch at Login in Settings > General keeps it around.

Trash by default, approvals when it matters. Built-in tasks move matches to the Trash, except Xcode’s two age-based tasks, which delete permanently: DerivedData runs directly, old Archives wait for approval.

History, notifications, Ops Feed. Every run leaves a record: Completed, No matches, Notified, Pending approval, Skipped, or Failed. Recent runs keeps the last 200. Runs also land in the Ops Feed, and a macOS notification with Approve and Skip buttons arrives when a task needs you. The Command Palette runs, pauses, approves, or skips a recipe by name.

Export and share. Export writes a .roomrecipe JSON file holding targets, rules, schedules, and modes, and no paths from your disk. Import it on another Mac and it arrives as a custom recipe.

How to clear Xcode DerivedData automatically

  1. Turn on the Xcode recipe. Its first task, Clean old DerivedData, is set to weekly on Monday at 09:00, older than 14 days, deleted permanently. Change the rule, hour, destination, or approval in the task’s gear menu.

  2. Let the schedule work. When a task is due, Room Service scans that category fresh, applies the rule, and checks each match again right before removing it.

  3. Review when asked. A task waiting for approval lists every matched path with its size. Approve, Skip, or Approve all. An approval expires by itself when the next scheduled run comes due.

  4. Check Recent runs. Each entry says what matched, what was cleaned, and why anything was skipped.

Run Now runs a recipe’s enabled tasks immediately. Because you are there, a task set to Approval required cleans right away instead of asking. There is no roomservice recipes command yet.

What a scheduled run will and will not do

  • A scheduled run asks first, whatever the task says, when a match is not rated Safe or belongs to a group bulk cleanups leave alone: Xcode archives and previews, simulator devices, Android system images and emulator, Unity Asset Store cache.

  • Never matched by any recipe: installed runtime versions (rustup, nvm, pyenv, conda), simulator devices, downloaded cloud copies, and duplicates. The engine drops them before any rule runs.

  • Every match is rechecked against the scan it came from. A file created after that scan is skipped with “Changed since the scan and was skipped”.

  • The same target, rule, and action never run twice in one pass; the second task is marked Skipped. Nothing runs while a scan or cleanup is active.

  • Trash means the macOS Trash, where you can put things back. Permanent cannot be undone.

  • Over MCP, list_recipes and list_recipe_targets are read-only. create_recipe saves a draft turned off for you to review, and refuses Restricted targets and AI app conversations, ChatGPT & Codex worktrees, and runtimes. It can use the Merged agent worktrees target, which asks for your Allow before an agent turns it on or runs it. set_recipe_enabled and run_recipe need the “Turn on and run recipes” group in Settings > Agents and Pro. Anything that deletes permanently asks for your Allow, and every agent action lands in the Ops Feed with the agent’s name.

Free vs Pro

Building recipes is free: create, edit, Add to Recipe, export, and import. Running them needs Pro (Recipe Runs): turning a recipe or task on, Run Now, approving a pending task, and run_recipe or set_recipe_enabled over MCP. Scheduled checks happen only with Pro.

Frequently Asked Questions

How do I clear Xcode DerivedData automatically on a Mac?

Can I schedule a weekly cache cleanup for npm, Homebrew, and JetBrains?

Is this safer than a cron job with rm -rf?

Does Room Service need to be running for schedules to fire?

Can I share a recipe with my team?

Can my AI agent set up recipes for me?

Explore more of Room Service