{"id":49357229,"url":"https://github.com/k-angama/macos-dev-cache-cleaner","last_synced_at":"2026-04-27T14:01:13.510Z","repository":{"id":348873958,"uuid":"1192479578","full_name":"k-angama/macOS-dev-cache-cleaner","owner":"k-angama","description":"A macOS menu bar app for inspecting and cleaning developer caches stored in your Home folder.","archived":false,"fork":false,"pushed_at":"2026-04-27T12:57:26.000Z","size":1351,"stargazers_count":39,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-27T13:23:38.892Z","etag":null,"topics":["cleaner-app","devcleaner","macos","swiftui"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/k-angama.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-26T09:00:30.000Z","updated_at":"2026-04-27T12:47:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/k-angama/macOS-dev-cache-cleaner","commit_stats":null,"previous_names":["k-angama/macos-dev-cache-cleaner"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/k-angama/macOS-dev-cache-cleaner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-angama%2FmacOS-dev-cache-cleaner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-angama%2FmacOS-dev-cache-cleaner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-angama%2FmacOS-dev-cache-cleaner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-angama%2FmacOS-dev-cache-cleaner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k-angama","download_url":"https://codeload.github.com/k-angama/macOS-dev-cache-cleaner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-angama%2FmacOS-dev-cache-cleaner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32339290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cleaner-app","devcleaner","macos","swiftui"],"created_at":"2026-04-27T14:00:46.867Z","updated_at":"2026-04-27T14:01:13.499Z","avatar_url":"https://github.com/k-angama.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./Ressources/DevCacheCleaner-icon.png\" alt=\"DevCacheCleaner icon\" width=\"128\" height=\"128\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eDevCacheCleaner\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  A macOS menu bar app for inspecting and cleaning developer caches stored in your Home folder and selected workspaces.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  DevCacheCleaner scans common cache-heavy directories, shows how much disk space they use, and lets you clean one category, all supported categories, or generated workspace folders with live progress feedback.\n\u003c/p\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./Ressources/DevCacheCleaner-screenshot.jpg\" alt=\"DevCacheCleaner Screenshot\"  \u003e\n\u003c/p\u003e\n\nIf you want to reclaim storage used by Xcode, Gradle, CocoaPods, npm, browsers, project dependencies, and other development tools without manually digging through `~/Library`, hidden folders, and workspace build outputs, this project is built for that workflow.\n\nDevCacheCleaner keeps the scope intentionally focused:\n\n- It only scans paths defined in the app configuration\n- It works inside the user Home directory\n- It asks for explicit Home-folder access before reading or deleting anything\n- It shows cleanup progress while files are being removed\n\n## Features\n\n- Menu bar utility built with SwiftUI\n- Security-scoped access to the user Home directory\n- Per-category storage overview\n- Single-category cleanup\n- Clean-all workflow across all non-empty categories\n- Workspace selection with persisted access\n- Workspace cleanup for generated dependency and build folders\n- Optional Clean All checkbox to include the selected workspace\n- Workspace details view showing the generated folders that can be cleaned\n- Cleanup progress window with live deletion feedback\n- Automatic refresh when watched cache folders change\n\n## How It Works\n\n1. The app requests access to your Home folder and stores a security-scoped bookmark.\n2. Storage categories are built from configured paths in [`Constants.swift`](./DevCacheCleaner/Common/Utils/Constants.swift).\n3. Each category is scanned and displayed in the main menu bar window.\n4. Folder changes are monitored so affected categories can refresh automatically.\n5. You can optionally select a workspace folder. The app scans it for supported generated directories such as `node_modules`, `Pods`, `.build`, `.gradle`, and `build`.\n6. Cleanup runs for one category, all non-empty Home-folder categories, the selected workspace, or Clean All plus the selected workspace when the confirmation checkbox is enabled.\n7. Cleanup progress is reported in a separate window.\n\n## Run In Xcode\n\n1. Open `DevCacheCleaner.xcodeproj`\n2. Select the `DevCacheCleaner` scheme\n3. Run the app\n\nThe app launches from the macOS menu bar and opens a secondary window during cleanup to display progress.\n\n\n## Architecture\n\nThe project follows a simple layered structure:\n\n- `Common`: shared constants, managers, utilities, extensions, dependency container\n- `Data`: repository implementations\n- `Domain`: entities, repository protocols, and use cases\n- `Presentation`: SwiftUI views, view models, and shared UI state\n- `DevCacheCleanerTests`: use case, mock, and view model tests\n\nMain behavior is driven by focused domain use cases such as:\n\n- `LoadStorageOverviewUseCase`\n- `RefreshStorageCategoryUseCase`\n- `CleanStorageCategoryUseCase`\n- `CleanAllStorageCategoriesUseCase`\n- `LoadWorkspaceCleanupCategoryUseCase`\n- `ReadDiskSpaceUseCase`\n- `ObserveDiskChangesUseCase`\n- `SaveWorkspaceAccessUseCase`\n- `ResolveWorkspaceAccessUseCase`\n\n## Project Structure\n\n```text\nDevCacheCleaner/\n├── DevCacheCleanerApp.swift            # Menu bar app entry and window scenes\n├── Assets.xcassets/                    # App icon and in-app artwork\n├── Common/\n│   ├── Extensions/                     # Shared helpers for URL, storage sizes, collections, colors\n│   ├── Managers/                       # File-system, monitoring, and Home-access integrations\n│   └── Utils/                          # Constants, alerts, parameters, shared utilities\n├── Data/\n│   └── Repositories/                   # Repository implementations\n├── Domain/\n│   ├── Entities/                       # Storage models and cleanup progress events\n│   ├── Repositories/                   # Repository protocols\n│   └── UseCases/\n│       ├── Cleanup/                    # Clean one category or all categories\n│       ├── HomeAccess/                 # Security-scoped Home-folder access\n│       ├── Monitoring/                 # Folder change observation\n│       └── Storage/                    # Build, load, refresh, and read storage data\n├── Presentation/\n│   ├── Stores/                         # Shared progress state for the cleanup window\n│   ├── Views/                          # Reusable SwiftUI views\n│   └── ...                             # Home/progress views and view models\n└── DevCacheCleanerTests/\n    ├── UseCase/                        # Domain use case tests\n    ├── ViewModel/                      # Presentation view model tests\n    ├── mock/                           # Repository mocks\n    └── Utils/                          # Shared test fixtures and async helpers\n```\n\n## Default Cache Categories\n\nDevCacheCleaner ships with built-in cleanup categories defined in\n[`Constants.swift`](./DevCacheCleaner/Common/Utils/Constants.swift). Each one\ngroups a set of cache paths inside the user Home directory and is scanned,\ndisplayed, and cleaned as a single category in the app.\n\n| Category | Typical Targets | Example Paths |\n| --- | --- | --- |\n| IDE Caches | VS Code cache data and workspace storage | `~/Library/Application Support/Code/Cache`, `~/Library/Application Support/Code/CachedData`, `~/Library/Application Support/Code/User/workspaceStorage` |\n| CocoaPods Caches | CocoaPods specs repos and cache folders | `~/.cocoapods/repos`, `~/Library/Caches/CocoaPods` |\n| npm and Yarn Caches | Node package manager caches | `~/.npm-cache-user/_cacache`, `~/Library/Caches/Yarn` |\n| Android and Gradle Caches | Gradle caches, daemon data, Android Studio cache roots | `~/.gradle/caches`, `~/.gradle/daemon`, `~/Library/Caches/Google`, `~/Library/Caches/JetBrains` |\n| Xcode Caches and DerivedData | DerivedData, Archives, simulator data, Xcode caches | `~/Library/Developer/Xcode/DerivedData`, `~/Library/Developer/Xcode/Archives`, `~/Library/Developer/CoreSimulator/Devices` |\n| Browser Caches | Chrome, Brave, Firefox, Safari, Edge, and Opera caches | `~/Library/Caches/Google/Chrome`, `~/Library/Caches/BraveSoftware/Brave-Browser`, `~/Library/Caches/com.apple.Safari` |\n| Flutter and pub-cache | Flutter and Dart package cache data | `~/.pub-cache` |\n\nSome built-in categories use prefix-based matching. For example, the\nAndroid/Gradle category only targets `AndroidStudio*` directories inside\ncertain JetBrains and Google cache roots.\n\n## Workspace Cleanup\n\nWorkspace cleanup is separate from the Home-folder cache categories. After a\nworkspace is selected, DevCacheCleaner scans the project tree for known marker\nfiles and only offers cleanup for generated directories that match those rules.\n\n| Project Type | Marker Files | Generated Directory |\n| --- | --- | --- |\n| Node.js | `package.json` | `node_modules` |\n| CocoaPods | `Podfile` | `Pods` |\n| Swift Package Manager | `Package.swift` | `.build` |\n| Android Gradle root | `settings.gradle`, `settings.gradle.kts` | `.gradle` |\n| Android module build output | `build.gradle`, `build.gradle.kts` | `build` |\n\nThe selected workspace can be cleaned directly from the workspace row. It can\nalso be included in the Clean All flow by checking the workspace option in the\nconfirmation alert. When this option is checked, the progress total includes\nboth the Home-folder cache categories and the selected workspace cleanup size.\n\nWorkspace cleanup is intended for generated dependency and build folders only.\nSource files, project files, and marker files are not part of the cleanup\ntargets.\n\n## Roadmap\n\n- Add a Settings screen\n- Make the minimum cleanup size threshold configurable\n- Allow users to enable or disable built-in cache categories\n- Allow users to manage ignored workspace paths\n- Add configurable workspace cleanup rules\n- Add a preview step before deleting files\n- Improve progress labels for combined Clean All and workspace cleanup\n\n## Notes\n\n- The app only cleans paths explicitly listed in `Constants`\n- Some configured paths use prefix matching so only specific child directories are removed\n- Workspace cleanup only targets generated directories matched by `WorkspaceCleanupRuleEntity`\n- Clean All includes the selected workspace only when the confirmation checkbox is checked\n- Cleanup deletes cache contents and cannot be undone\n- Backing up anything important before cleaning is still the safer choice\n\n## License\n\nThe source code in this repository is licensed under `GPL-3.0-only`. See\n[`LICENSE`](./LICENSE).\n\nThe project name, logos, icon assets, and official branding are not granted\nunder the GPL code license. See [`TRADEMARKS.md`](./TRADEMARKS.md).\n\nOfficial Mac App Store releases are published by Karim Angama.\n\n---\n\n## 🧑‍💻 Author\n\n**k.angama**  \n[GitHub](https://github.com/k-angama) • [LinkedIn](https://www.linkedin.com/in/karim-angama)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk-angama%2Fmacos-dev-cache-cleaner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk-angama%2Fmacos-dev-cache-cleaner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk-angama%2Fmacos-dev-cache-cleaner/lists"}