lysosome

Open-source CLI available now Mac app in free beta

Digest what your agents leave behind.

Claude Code, Cursor and parallel agents spin up git worktrees all day, and each one drags its own node_modules, target/ or .venv. lysosome finds them, along with stale build output, package caches, local AI models, Docker and Xcode data. It labels every item by how safe it is to remove, and never touches work you haven't pushed.

brew install lysosome-dev/tap/lysosome CLI · available now · more ways to install
regenerable · safe to clear expensive · costs a re-download review · left for you

Example output

See where the space went before anything is deleted.

Four commands, all in the current release. worktrees, scan and caches only read; clean is a dry run until you add --yes, re-checks every item right before acting, moves files to the Trash and logs every action. REVIEW and ORPHAN items are never cleaned. Every command also speaks --json, a stable, versioned contract you can script against.

example output
$ lysosome worktrees ~/code --top 6

  23 dormant worktrees are holding 41.2 GB  of 31 found · idle 30+ days

    18.6 GB  safe to remove now          14 clean, merged or pushed
    27.9 GB  build & dependency output   strippable even from worktrees you keep

  STATUS       SIZE  ARTIFACTS  IDLE  BRANCH                 PATH
  REMOVABLE  6.4 GB     5.8 GB   47d  feat/checkout-v2       ~/code/shop/.claude/worktrees/checkout-v2
  REMOVABLE  4.1 GB     3.6 GB   38d  agent/fix-flaky-tests  ~/code/api/.claude/worktrees/fix-flaky-tests
  REVIEW     3.9 GB     3.1 GB   61d  spike/rust-indexer     ~/code/indexer-spike
             └ 2 unpushed commits, not merged
  REMOVABLE  3.2 GB     2.9 GB   33d  refactor-auth          ~/.cursor/worktrees/web/refactor-auth
  ORPHAN     2.7 GB     2.4 GB   96d  –                      ~/code/old-monorepo-wt
             └ parent repo moved or deleted
  REVIEW     2.2 GB     1.7 GB   44d  feat/onboarding        ~/code/app-onboarding
             └ 14 uncommitted changes
  … 17 more (use --top N)

  2 stale worktree records point at deleted folders  harmless; `git worktree prune` clears them
    ~/code/shop  →  ~/code/shop/.claude/worktrees/old-cart
    ~/code/api  →  ~/code/api/.claude/worktrees/v1-cleanup

  Suggested cleanup for REMOVABLE worktrees  review, then run yourself
    git -C "/Users/you/code/shop" worktree remove "/Users/you/code/shop/.claude/worktrees/checkout-v2"
    git -C "/Users/you/code/api" worktree remove "/Users/you/code/api/.claude/worktrees/fix-flaky-tests"
    git -C "/Users/you/code/web" worktree remove "/Users/you/.cursor/worktrees/web/refactor-auth"
    … 11 more (see --json for every command)
    Removing a worktree keeps its branch; delete merged branches with `git branch -d`.

  Scanned 2,184 folders under ~/code in 3.8s. Nothing was changed.

Example output in the format of lysosome v0.2.0, with made-up paths and sizes and some sections shortened. Your numbers will differ.

What it finds

Six places a dev Mac quietly fills up.

Every finding carries a safety tier, so you know what a deletion costs before you make it.

  • Agent worktrees

    .claude/worktrees/* ~/.cursor/worktrees/* git worktree add

    Idle 30+ days, clean, and merged or pushed: removable. Dirty, locked or unpushed: left for you. Orphans and stale metadata get flagged too.

    regenerablereview

  • Build artifacts

    node_modules target/ .venv .next dist Pods

    Only folders git confirms are ignored, ranked by how long the project has been untouched.

    regenerable_expensive

  • Local AI models

    ~/.ollama/models ~/.cache/huggingface ~/.lmstudio

    Listed by model name, size and last use, not blob hashes, with what it would cost to download again.

    regenerable_expensive

  • Package caches

    ~/.npm pnpm store ~/.cargo/registry Go Gradle Homebrew

    Resolved from each tool where it can tell us, so custom cache locations are found too.

    regenerable

  • Docker & OrbStack

    build cache images volumes

    Build cache is cheap to lose; images cost a pull. Volumes may hold data, so they stay in review.

    regenerableregenerable_expensivereview

  • Xcode

    DerivedData iOS DeviceSupport simulators Archives

    DerivedData rebuilds on the next build. Archives hold dSYMs you may need for crash reports.

    regenerableregenerable_expensivereview

Safety

Careful by default, every time.

A lysosome breaks down only what the cell has marked as waste. Same idea here: nothing goes unless it's clearly rebuildable, and anything ambiguous waits for you.

Scans are read-only
Git runs with --no-optional-locks. Nothing is written, not even the index.
Dry run first
clean prints exactly what would happen. Nothing changes until you add --yes.
Unpushed work is off-limits
Worktrees with uncommitted changes, untracked files, locks or unpushed commits are never removed.
Recoverable
Items go to the macOS Trash, or through the tool's own cleanup: git worktree remove, docker image prune, brew cleanup, xcrun simctl.
Only ignored files count
A folder is an artifact only if git check-ignore agrees. Tracked source is never called junk.
When unsure, it asks
Anything ambiguous is labeled REVIEW, never REMOVABLE.

Free and open source

Get the CLI.

Available now. MIT-licensed, written in Rust, macOS first. Prebuilt binaries for macOS (Apple Silicon and Intel) and Linux (glibc and musl) are on the releases page.

  • Homebrewbrew install lysosome-dev/tap/lysosome
  • Scriptcurl -fsSL https://lysosome.dev/install.sh | sh
  • Cargocargo install --git https://github.com/lysosome-dev/cli lysosome
  • Completionslysosome completions zsh

Free beta · lysosome for Mac

Stop finding out at 2 GB free, mid-build.

A native menu bar app built on the CLI. It keeps watch so you don't have to remember to run anything.

  • Disk pressure, always on. A quiet gauge in the menu bar, and an alert before your SSD fills during a build or a model pull.
  • Knows which agent made what. Worktrees are tied to the Claude Code or Cursor session that created them, so you can tell a live task from a forgotten one.
  • Cleanups on a schedule. Rules like "regenerable caches older than 14 days, Sundays at 3am". Review items are never part of a rule.
  • One click, with undo. Reclaim shows exactly what goes first. Files go to the Trash and Undo puts them back; caches are cleaned by their own tool.
  • History. Charts of where your space went, week by week.
  • Model library. Every local model in one list, with last use, size and re-download cost.
The menu bar popover, with example data.
lysosome for Mac Overview on example data: a circle-packed map of worktrees, build artifacts, models, Xcode and caches, 257 GB safe to reclaim, a Reclaim 102 GB button and a banner warning the disk fills in about 6 days.
Overview: everything dormant on one slide, labeled by how safe it is to remove. Example data.
The Reclaim confirmation: free 102 GB across Xcode, package caches, agent worktrees, build artifacts, Docker and editor caches; 26 items go to the Trash with Undo, 11 worktrees are removed with git, 11 caches are cleaned by their tool.
Before anything moves, it tells you what has Undo and what doesn't.
The Worktrees view on example data: worktrees grouped under Claude Code, each with its branch, the task that created it, idle days, size and whether it's removable or needs review.
Worktrees, matched to the agent session that made them.

CLI or app

The CLI is free. The app does it for you.

Feature comparison between the free lysosome CLI and lysosome for Mac
FeatureCLI free · MITMac app free beta · paid at 1.0
Find worktrees, artifacts, caches, models, Docker, XcodeYesYes
Safety tier on every itemYesYes
Dry-run cleanup to the TrashYesYes
Stable --json for scriptsYesBuilt on it
Always-on disk pressure monitoringNoYes
Alerts before the disk fillsNoYes
Agent-aware worktree trackingNoYes
Scheduled cleanups with rulesNoYes
One-click reclaim with undoNoYes
History charts and model libraryNoYes
Team and fleet viewNoLater

Pricing

Free while it's in beta.

The CLI is free and stays that way. lysosome for Mac is free during the public beta. At 1.0, seeing where your disk went (scans, the menu bar gauge, alerts) stays free, and a one-time license unlocks one-click cleanup and scheduled rules. Buy it now at the early-bird price and it's yours for good.

One-time purchase, $29 after the beta. Includes a year of updates; the key works offline, no account needed.

Questions

What is lysosome?

A disk cleaner for developers on macOS. The open-source lysosome CLI shows where your disk went (dormant git worktrees, git-ignored build artifacts, package caches, local AI models, Docker and Xcode data), labels each item by how safe it is to delete, and cleans up safely. The CLI is free and open source. lysosome for Mac, a menu bar app built on it, is in free public beta, and there are Linux builds too.

Why are agent worktrees such a problem?

Agent tools create a git worktree per task so they can work in parallel, and nothing removes them afterwards. Each worktree gets its own dependency install and build output, so a few weeks of agent work can leave dozens of copies of node_modules or target/ behind.

Can it delete something I still need?

It's built not to. Scans never modify anything. Worktrees with uncommitted changes, untracked files, locks or unpushed commits are never removed. clean is a dry run until you add --yes, and removed items go to the macOS Trash or through the tool's own cleanup command.

How do I install the CLI?

With Homebrew: brew install lysosome-dev/tap/lysosome. Or run the install script, curl -fsSL https://lysosome.dev/install.sh | sh, or build from source with cargo install --git https://github.com/lysosome-dev/cli lysosome. Prebuilt binaries for macOS and Linux are on the GitHub releases page, and lysosome completions zsh prints shell completions (bash, fish and others too).

Does it work on Linux or Windows?

macOS comes first, on Apple Silicon and Intel. The CLI also ships prebuilt Linux binaries (x86_64 and arm64, glibc and musl), and the desktop app has a .deb and an AppImage for x86_64 Linux. Windows isn't planned.

How much will the Mac app cost?

It's free during the public beta. At 1.0, scanning, alerts and Undo stay free, and one-click cleanup and scheduled rules need a one-time license: $19 early-bird during the beta, $29 after. It includes a year of updates.

What happens to my email?

It's used only to tell you when lysosome for Mac 1.0 ships, plus CLI news if you asked for it. We don't sell or share it, every email has an unsubscribe link, and the privacy page lists exactly what we store. The CLI has no telemetry.