{"slug": "clean-up-what-your-apps-and-agents-left-running", "title": "Clean up what your apps and agents left running", "summary": "A free, open-source Mac app called Leftovers, released under the MIT license for macOS 14 or later on Apple silicon and Intel, finds and cleans up dev servers, MCP servers, git worktrees and background jobs left running by apps and coding agents. On the Mac it was built on, Leftovers measured a system strength score of 41% before cleanup and 68% after, and reported 3.9 GB held by duplicate MCP servers across twelve Claude Code sessions, a video encoder that leaked 59 GB into swap while showing 7 MB, and 93 GB of old Xcode build files. The app never quits system or root processes, asks before quitting anything, and makes no network requests beyond an optional update check.", "body_md": "A free, open-source Mac app. It finds the dev servers, MCP servers, git worktrees and background jobs your apps and agents left behind, shows what they cost you, and cleans them up safely.\n\nmacOS 14 or later · Apple silicon and Intel · Signed and notarized · MIT license\n\nHow strong is your Mac right now?\n\nLeftovers adds up what the leftovers are costing you in memory, swap and disk, and shows your Mac's strength now next to what a safe cleanup gives back. On the Mac it was built on: 41% now, 68% after cleanup.\n\nIt's an honest estimate, with the formula one click away: half memory available, a third swap, a fifth free disk.\n\nYour Mac is slow, and nothing tells you why.\n\nActivity Monitor sorts by memory in RAM. The memory that is actually lost is somewhere else.\n\nLeaks hide in swap\n\n59 GB held by a helper showing 7 MB\n\nA video encoder leaked for four days. Almost all of it had been pushed to swap, so it barely showed up. Leftovers measures the full footprint: RAM, compressed and swapped.\n\nAgents leave a mess behind\n\n3.9 GB of duplicate MCP servers\n\nTwelve Claude Code sessions each started their own copy of the same four MCP servers. Dev servers kept running days after their terminal closed.\n\nCleaning up shouldn't be risky\n\n0 macOS processes ever quit\n\nLeftovers never touches system or root processes. It asks before quitting anything, and checks a process is still the same one before it sends a signal.\n\nLike kids running through the house.\n\nEach coding agent grabs something, sets up, and runs off to the next thing. The blocks, the plate and the shoes stay where they were dropped. On a Mac, those are dev servers, builds and MCP servers, and they keep holding memory until someone picks them up.\n\nEverything in one menu-bar dial.\n\nThe needle shows memory in use. The menu shows what to do about it.\n\nLikely leaks\n\nIdle processes holding memory they don't use, each with a plain-language reason and a Quit button.\n\nApps, with their logos\n\nEvery app with all of its helper processes added up, so the one hogging memory has a face.\n\nAgents\n\nMemory for each Claude Code, Codex, Gemini CLI, Cursor Agent, Aider or OpenCode session, and everything it started.\n\nYour Mac's strength\n\nMemory, swap and disk in one score, now and after a safe cleanup, with the formula shown.\n\nDisk, split three ways\n\nHow much is macOS, how much your apps and their data, how much is yours. Then clear the developer caches that rebuild themselves.\n\nAdvanced cleanup\n\nAI models, Docker, old node_modules, dead simulators and Time Machine snapshots, each scanned only when you open it.\n\nWorktree cleanup\n\nFinds git worktrees whose work is already on main, squash merges included, and removes them one by one or all at once.\n\nScheduled jobs\n\nEvery background job with its schedule, next run and status, and which agent set it up.\n\nOne-step cleanup\n\nQuit every likely leak at once, after a standard confirmation that lists what will stop.\n\nFast and light\n\nOpen to numbers in well under a second, and each refresh shows how long it took. About 22 MB and no CPU at idle.\n\nPrivate\n\nNo accounts, no telemetry. The only network request is an update check you can turn off. Everything it reads stays on your Mac.\n\nWhere did the disk go?\n\nLeftovers splits your disk three ways: macOS itself, the apps you installed with their data and caches, and your own files. Then it offers the caches that rebuild themselves. On the Mac it was built on, Xcode alone was keeping 93 GB of old build files.\n\nA cache is only emptied while nothing using it runs, and your code and documents are never touched.\n\nAdvanced goes further: downloaded AI models, Docker images and build cache, old node_modules, simulators that can never start again, and local Time Machine snapshots. And if the disk drops under 10% free, you get one quiet notification a day.\n\nAdvanced: the big, rare cleanups\n\nOn the Mac it was built on: 40 simulators that could never start again, holding 7 GB. Each Advanced page scans only when you open it.\n\nThe worktrees your agents forgot.\n\nAgents open a git worktree per task and rarely clean up. Leftovers checks every one: is its work already on main, does it have uncommitted changes, is anything still working in it. It even spots branches that were squash-merged on GitHub, which git itself can't see.\n\n54 of 78 worktrees already on main\n\n51 of them squash-merged on GitHub. Removable in one step.\n\n55 GB of disk given back\n\nEach worktree carries its own dependencies and build output.\n\n0 uncommitted changes ever lost\n\nThe check is read-only, and git refuses to remove a worktree with unsaved work. Branches are kept.\n\nEvery background job, including the ones your agents scheduled.\n\nAgents don't just leave processes running. They schedule things: a watcher every 20 minutes, a script every morning. Leftovers lists every background job in your account with a schedule you can read, when it runs next, and whether it's working or failing.\n\nPause, resume or run a job now, open its log, or move it to the Trash\n\nJobs an agent created are labelled with what they're for and when they end\n\nFailing jobs stand out: it found a broken updater on the first run\n\nBuilt for agents, usable by agents.\n\nThe app is also a command-line tool with the same engine and the same safety rules, so an agent can check memory and clean up after itself.\n\n```\n# add the command once\nln -s /Applications/Leftovers.app/Contents/MacOS/Leftovers ~/.local/bin/leftovers\n\nleftovers --report   # readable summary\nleftovers --json     # likelyLeaks, agents, duplicateToolServers\nleftovers --clean    # quit likely leaks; protected processes are refused\nleftovers --jobs     # scheduled background jobs (add --json)\nleftovers --worktrees # git worktrees and which are safe to remove (add --json)\n```\n\nAgents that schedule a job can leave a one-line note in ~/Library/Application Support/Leftovers/jobs/<label>.json (purpose, creator, end date), and Leftovers labels the job with it.\n\nInstall\n\nDownload\n\nOpen the disk image and drag Leftovers to Applications. It's signed and notarized by Apple, so it opens without warnings.\n\nNo price, no account, no telemetry. If Leftovers gave you back a slow afternoon, a star on GitHub helps other people find it, and following along on X is how you'll hear what's next.", "url": "https://wpnews.pro/news/clean-up-what-your-apps-and-agents-left-running", "canonical_source": "https://arpwal.github.io/leftovers/", "published_at": "2026-10-19 19:58:26+00:00", "updated_at": "2026-10-19 20:17:23.746396+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "mlops"], "entities": ["Leftovers", "Claude Code", "Codex", "Gemini CLI", "Cursor Agent", "Aider", "OpenCode", "Xcode"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/clean-up-what-your-apps-and-agents-left-running", "markdown": "https://wpnews.pro/news/clean-up-what-your-apps-and-agents-left-running.md", "text": "https://wpnews.pro/news/clean-up-what-your-apps-and-agents-left-running.txt", "jsonld": "https://wpnews.pro/news/clean-up-what-your-apps-and-agents-left-running.jsonld"}}