Skip to content
Back to search

devsweep

Safe disk cleanup for developers on macOS: Xcode, simulators, Android SDK, Gradle, build folders, AI agent worktrees. App, CLI and MCP server.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/ikbalcan--devsweep/badge.svg)](/listings/ikbalcan--devsweep)

HTML

<a href="/listings/ikbalcan--devsweep"><img src="/api/listings/ikbalcan--devsweep/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 142 lines
  1. # DevSweep
  2. Safe disk cleanup for developers on macOS. DevSweep knows Xcode, iOS simulators, the Android SDK and emulators,
  3. Gradle, project build folders and package-manager caches, and tells you **what is safe to remove before you remove it**.
  4. ![DevSweep in 40 seconds: why it exists, the three safety tiers, protected projects, the menu bar and MCP](docs/images/demo.gif)
  5. > **Heads-up:** DevSweep deletes files. It is built to be careful (see the safety model below), but it comes
  6. > with no warranty. Try `devsweep clean --dry-run` first and keep a backup (Time Machine) of anything you care about.
  7. > **Project status:** a personal tool I built for my own Mac and share in case it helps others. I maintain it
  8. > as time allows, with no support or response-time guarantee. Issues and pull requests are welcome, but may
  9. > go unanswered for a while.
  10. ## Screenshots
  11. ![Overview: free space, the three safety tiers and space used per area](docs/images/overview.png)
  12. ![Projects: build folders per project, active projects locked, what will be removed shown on the right](docs/images/projects.png)
  13. ![AI tools and editors: Cursor, Claude, VS Code, Ollama and more, each with its tier](docs/images/ai-tools.png)
  14. <p align="center">
  15. <img src="docs/images/menu-bar.png" width="340" alt="Menu bar popover with free space and a one-click safe clean">
  16. &nbsp;
  17. <img src="docs/images/item-detail.png" width="340" alt="Item detail: what you will lose and exactly which path is removed">
  18. </p>
  19. ## Safety model
  20. Every item gets one of three tiers:
  21. | Tier | Meaning | Default |
  22. |---|---|---|
  23. | **Rebuilds** | Regenerated by the next build or install (DerivedData, `~/.gradle/caches`, `node_modules`, `build/`) | Selected, deleted outright |
  24. | **Re-download** | No data loss, but needs internet again (simulator runtimes, system images, NDKs, Gradle dists) | Not selected, moved to Trash |
  25. | **Has data** | May hold your own state (simulators, emulators, Xcode archives with dSYMs, Maven local installs) | Never auto-selected, needs explicit confirmation |
  26. Protected automatically: running simulators and emulators, open Xcode's recent DerivedData, Gradle while a daemon
  27. or Android Studio runs, projects with uncommitted changes or commits in the last 7 days, Gradle versions and system
  28. images still in use, the newest build-tools, archives newer than 90 days, npx tools that are running.
  29. Before anything is removed, `PathSafety` checks every path again: it must be inside your home folder (or the Android
  30. SDK), at least two levels deep, not a critical folder, not inside `.git`, and not reached through a symlink.
  31. Simulators and runtimes are removed with `xcrun simctl`, never with `rm`.
  32. ## Build
  33. ```bash
  34. scripts/bundle.sh # dist/DevSweep.app and dist/devsweep
  35. swift test
  36. ```
  37. Runs on macOS 14+. Building needs Xcode 26+ (for the Liquid Glass APIs).
  38. The bundled app is ad-hoc signed, not notarized, so Gatekeeper blocks the first launch. Right-click
  39. `DevSweep.app` and choose **Open**, or clear the quarantine flag once:
  40. ```bash
  41. xattr -dr com.apple.quarantine dist/DevSweep.app
  42. ```
  43. ## CLI
  44. ```bash
  45. devsweep status # free space and totals per tier
  46. devsweep scan [--json] # everything found, grouped by area
  47. devsweep clean --tier rebuilds --dry-run # what would be removed
  48. devsweep clean --tier rebuilds --yes # remove all unprotected Rebuilds items
  49. ```
  50. Has-data items can only be removed from the app, one by one.
  51. ## Large files
  52. A separate **Large files** section lists your own files over 100 MB (installers, archives, videos, documents)
  53. so you can find what fills the disk beyond developer data. It is deliberately apart from the safe cleans:
  54. nothing is selected for you, files always go to the Trash first, and they are never touched by the menu bar
  55. button, rules, the CLI or AI agents. Git repositories, sync folders, ~/Library and app packages are not searched.
  56. ## AI agents (MCP)
  57. `devsweep mcp` is a Model Context Protocol server over stdio. Add it to Claude Code:
  58. ```bash
  59. claude mcp add devsweep -- /Applications/DevSweep.app/Contents/Resources/devsweep mcp
  60. ```
  61. | Tool | What it does |
  62. |---|---|
  63. | `disk_status` | Free space and, from the cached last scan, how much is safe to free. Instant. |
  64. | `plan_cleanup` | Read-only list of what a tier would remove and what stays protected and why. |
  65. | `clean_safe` | Scans, then removes unprotected **Rebuilds** items only. Off when "Allow AI agents to clean" is off. |
  66. ### Agent skill
  67. [`skills/devsweep/SKILL.md`](skills/devsweep/SKILL.md) tells the agent when to reach for these tools
  68. (disk full, `No space left on device`, "what is using my disk") and how: check, plan, ask, then clean.
  69. Install it for Claude Code:
  70. ```bash
  71. mkdir -p ~/.claude/skills && cp -R skills/devsweep ~/.claude/skills/
  72. ```
  73. Every clean (app, menu bar, notification, CLI, MCP, rules) is logged in
  74. `~/Library/Application Support/DevSweep/history.jsonl` and shown under Automation > History
  75. (`devsweep history` in the terminal).
  76. ## Status
  77. v0.7: Large files section for your own big files outside developer folders.
  78. v0.6: agent worktrees. Finds git worktrees left behind by Cursor, Claude Code and Codex (and any other
  79. worktree of your repositories) and removes them with `git worktree remove`, never `--force`. Worktrees
  80. with uncommitted or untracked files, commits on no branch, a lock, or use in the last 7 days are kept;
  81. the branch always stays. Fixed: the safe clean always reported one failure (Dart analysis cache);
  82. history now keeps the reason for every skipped item.
  83. v0.5: rescans in about a second (unchanged folders reuse their size for up to a day; Rescan Fully
  84. with ⇧⌘R or `--full`), Docker (build cache, unused images, stopped containers, anonymous volumes via
  85. `docker ... prune`), Cursor's chat database shows how little compacting would free, closer glass look on
  86. macOS 14 and 15.
  87. v0.4: MCP server, automation rules (weekly stale-project sweep, auto-clean when almost full,
  88. remove unavailable simulators; all off by default), "Always keep" list shared by every entry point,
  89. clean history, instant launch from the cached last scan, option to start in the menu bar only.
  90. v0.3: AI tools & editors area, live scan progress, Liquid Glass controls, app icon.
  91. v0.2: menu bar popover with live free space and one-click safe clean, low-disk notifications
  92. (one per step down, re-armed after recovery, with a "Free X safely" action), settings (threshold,
  93. notifications, menu bar text, Dock icon, open at login).
  94. v0.1: scanner, 11 recipes, app (overview, area detail with inspector, review sheet), CLI.
  95. Next: see `ROADMAP.md`.
  96. Notifications and open-at-login only work from the bundled app (`scripts/bundle.sh`), not from `swift run`.
  97. ## License
  98. MIT, see [LICENSE](LICENSE). Security issues: see [SECURITY.md](SECURITY.md).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.