{"id":51771398,"url":"https://github.com/panz3r/depsclean","last_synced_at":"2026-07-20T01:34:11.631Z","repository":{"id":358763255,"uuid":"1238831471","full_name":"panz3r/depsclean","owner":"panz3r","description":"A fast, interactive CLI/TUI for discovering and removing dependency directories (`node_modules`, `.venv`, `vendor`, and more) to reclaim disk space.","archived":false,"fork":false,"pushed_at":"2026-05-19T00:09:33.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-19T02:23:43.386Z","etag":null,"topics":["cleaner","developer-tools","disk-cleanup","disk-space","golang","golang-application"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/panz3r.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","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-05-14T13:51:01.000Z","updated_at":"2026-05-19T00:06:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/panz3r/depsclean","commit_stats":null,"previous_names":["panz3r/depsclean"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/panz3r/depsclean","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panz3r%2Fdepsclean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panz3r%2Fdepsclean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panz3r%2Fdepsclean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panz3r%2Fdepsclean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panz3r","download_url":"https://codeload.github.com/panz3r/depsclean/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panz3r%2Fdepsclean/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35670231,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-19T02:00:06.923Z","response_time":112,"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","developer-tools","disk-cleanup","disk-space","golang","golang-application"],"created_at":"2026-07-20T01:34:10.724Z","updated_at":"2026-07-20T01:34:11.596Z","avatar_url":"https://github.com/panz3r.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# depsclean\n\n\u003e A fast, interactive CLI/TUI for discovering and removing dependency directories (`node_modules`, `.venv`, `vendor`, and more) to reclaim disk space.\n\u003e\n\u003e Inspired by [npkill](https://github.com/voidcosmos/npkill) and [bunkill](https://github.com/codingstark-dev/bunkill).\n\n---\n\n## Features\n\n- **Streaming discovery** — results appear immediately as the scan walks your filesystem\n- **Async enrichment** — size, age, and package metadata load in the background without blocking navigation\n- **Full-screen TUI** — keyboard-driven list with compact/details row modes, search, sort cycling, and a details panel\n- **Multi-select and range selection** — delete single items, a selected set, or use `delete-all` for batch removal\n- **Dry-run mode** — simulate any deletion safely before committing\n- **Multiple scan profiles** — Node, Python, Rust, Go, PHP, Ruby, Java, or \"all\"\n- **JSON / NDJSON output** — machine-friendly output for scripting and pipelines\n- **Safe deletion guards** — basename allowlist, absolute-path enforcement, and empty-targets guard prevent accidental deletion\n\n---\n\n## Installation\n\n### Pre-built Binaries (Recommended)\n\nDownload the latest pre-built binary for your platform from the [GitHub Releases](https://github.com/panz3r/depsclean/releases) page.\n\n#### Linux/macOS\n\n```bash\n# Download and install (replace $VERSION with the latest version)\ncurl -L -o depsclean \"https://github.com/panz3r/depsclean/releases/download/v$VERSION/depsclean_linux_amd64\"\n\n# Make executable\nchmod +x depsclean\n\n# Move to PATH (optional)\nsudo mv depsclean /usr/local/bin/\n```\n\n#### macOS note\n\nIf you install the binary manually on macOS, remove the quarantine attribute before first use:\n\n```bash\nxattr -dr com.apple.quarantine /usr/local/bin/depsclean\n```\n\n#### Windows\n\n1. Download `depsclean_windows_amd64.exe` from the [GitHub Releases](https://github.com/panz3r/depsclean/releases) page\n2. Rename it to `depsclean.exe` if you want\n3. Place it in a directory on your `PATH`, or run it directly\n\n#### Platform-specific downloads\n\n- **Linux AMD64**: `depsclean_linux_amd64`\n- **Linux ARM64**: `depsclean_linux_arm64`\n- **macOS Intel**: `depsclean_macos_intel`\n- **macOS Apple Silicon**: `depsclean_macos_arm64`\n- **Windows AMD64**: `depsclean_windows_amd64.exe`\n- **Windows ARM64**: `depsclean_windows_arm64.exe`\n\n### From source (requires Go 1.26.3+)\n\n```sh\ngo install github.com/panz3r/depsclean/cmd/depsclean@latest\n```\n\n---\n\n## How it works\n\n1. `depsclean` (or `depsclean ui`) launches the interactive TUI and starts scanning from the current directory (or `--root`).\n2. Discovered target directories stream into the list as they are found.\n3. A background worker pool enriches each row with its on-disk size, last-modified date, and package metadata (package name/version, package manager).\n4. You navigate, search, sort, and delete interactively — or exit and use `depsclean scan` for non-interactive output.\n\nDeletion is safe by design:\n- The path must be absolute.\n- The directory's basename must match an entry in the active profile's target list.\n- The directory must exist and be a directory (not a file).\n- `--dry-run` skips the actual `os.RemoveAll` call and reports success without touching the filesystem.\n\n---\n\n## Configuration\n\n`depsclean` looks for a configuration file in two locations (first match wins):\n\n1. `.depsclean.json` in the current working directory\n2. `~/.config/depsclean/config.json`\n\nYou can also pass an explicit path with `depsclean scan --config /path/to/config.json`.\n\n### Config file format\n\n```json\n{\n  \"version\": 1,\n  \"profile\": \"node\",\n  \"targets\": [\"node_modules\"],\n  \"excludes\": [\"vendor\", \".git\"],\n  \"skip_hidden\": true,\n  \"max_depth\": 10,\n  \"dry_run\": false,\n  \"output_format\": \"text\"\n}\n```\n\n| Field           | Type       | Default         | Description                                              |\n|-----------------|------------|-----------------|----------------------------------------------------------|\n| `version`       | `int`      | —               | Config file version (informational, currently unused)   |\n| `profile`       | `string`   | `\"node\"`        | Built-in scan profile (see `depsclean profiles`)          |\n| `targets`       | `[]string` | `[\"node_modules\"]` | Directory names to treat as targets                  |\n| `excludes`      | `[]string` | `[]`            | Glob patterns to exclude (matched on full path or basename) |\n| `skip_hidden`   | `bool`     | `true`          | Skip directories whose name starts with `.`             |\n| `max_depth`     | `int`      | `10`            | Maximum directory depth to scan (`0` = unlimited)       |\n| `dry_run`       | `bool`     | `false`         | Simulate deletions without removing any files           |\n| `output_format` | `string`   | `\"text\"`        | Output format for `scan`: `text`, `json`, or `ndjson`   |\n\n**Precedence order (highest wins):** CLI flags › config file › built-in defaults.\n\n---\n\n## CLI usage\n\n```\ndepsclean [flags]                  Launch the interactive TUI (default command)\ndepsclean ui [flags]               Launch the interactive TUI explicitly\ndepsclean scan [flags]             Scan and print results (non-interactive)\ndepsclean delete-all [flags]       Delete all discovered directories (batch)\ndepsclean profiles                 List built-in scan profiles\ndepsclean version [--check-update] Print version; optionally check for updates\n```\n\n### Global / shared flags\n\n| Flag             | Default        | Description                                         |\n|------------------|----------------|-----------------------------------------------------|\n| `--root`         | `.`            | Root directory to scan                              |\n| `--profile`      | `node`         | Built-in profile (`node`, `python`, `rust`, etc.)  |\n| `--exclude`      | _(none)_       | Glob pattern to exclude (repeatable)                |\n| `--skip-hidden`  | `true`         | Skip hidden directories (name starts with `.`)      |\n| `--max-depth`    | `10`           | Maximum scan depth (`0` = unlimited)                |\n| `--dry-run`      | `false`        | Simulate deletions without removing files           |\n\n### `depsclean scan` additional flags\n\n| Flag        | Default  | Description                                            |\n|-------------|----------|--------------------------------------------------------|\n| `--config`  | _(auto)_ | Explicit config file path (bypasses auto-detection)    |\n| `--format`  | `text`   | Output format: `text`, `json`, or `ndjson`             |\n\n### `depsclean delete-all` additional flags\n\n| Flag      | Default | Description                                              |\n|-----------|---------|----------------------------------------------------------|\n| `--yes`   | `false` | Confirm actual deletion (required unless `--dry-run`)    |\n\n### Examples\n\n```sh\n# Launch TUI in the current directory\ndepsclean\n\n# Scan ~/workspace with the Python profile\ndepsclean scan --root ~/workspace --profile python\n\n# Stream NDJSON to a file\ndepsclean scan --root ~/projects --format ndjson \u003e results.ndjson\n\n# Dry-run delete-all to preview what would be removed\ndepsclean delete-all --dry-run --root ~/workspace\n\n# Actually delete all found node_modules (requires --yes)\ndepsclean delete-all --yes --root ~/workspace\n```\n\n---\n\n## Built-in profiles\n\n| Profile  | Targets                                                          |\n|----------|------------------------------------------------------------------|\n| `node`   | `node_modules`                                                   |\n| `python` | `.venv`, `venv`, `__pycache__`, `.pytest_cache`, `.mypy_cache`, `dist`, `build`, `*.egg-info` |\n| `rust`   | `target`                                                         |\n| `go`     | `vendor`                                                         |\n| `php`    | `vendor`                                                         |\n| `ruby`   | `vendor/bundle`, `.bundle`                                       |\n| `java`   | `target`, `.gradle`, `build`                                     |\n| `all`    | Union of all the above                                           |\n\nRun `depsclean profiles` to see the full list with descriptions.\n\n---\n\n## TUI key bindings\n\n| Key(s)             | Action                                              |\n|--------------------|-----------------------------------------------------|\n| `↑` / `k`          | Move cursor up                                      |\n| `↓` / `j`          | Move cursor down                                    |\n| `PgUp` / `Ctrl+B`  | Page up                                             |\n| `PgDn` / `Ctrl+F`  | Page down                                           |\n| `Home` / `g`       | Jump to first item                                  |\n| `End` / `G`        | Jump to last item                                   |\n| `/`                | Enter search/filter mode                            |\n| `Esc`              | Exit search mode / clear selection / reset range    |\n| `s`                | Cycle sort mode (size↓ → size↑ → name↑ → path↑ → newest → oldest) |\n| `d`                | Toggle compact / details row mode                   |\n| `Enter`            | Toggle details panel for the focused item           |\n| `Space`            | Toggle selection of the focused item                |\n| `a`                | Select all visible eligible items (toggle)          |\n| `r`                | Set range anchor (first press) / select range (second press) |\n| `x` / `Delete`     | Delete the focused item                             |\n| `X`                | Delete all selected items                           |\n| `o`                | Open project folder in the system file explorer     |\n| `q` / `Ctrl+C`     | Quit                                                |\n\n---\n\n## Credits\n\n- [npkill](https://github.com/voidcosmos/npkill) — inspiration for streaming discovery and safe deletion\n- [bunkill](https://github.com/codingstark-dev/bunkill) — inspiration for richer metadata and sort/filter ergonomics\n- [Bubble Tea](https://github.com/charmbracelet/bubbletea) — TUI framework\n- [Lip Gloss](https://github.com/charmbracelet/lipgloss) — terminal styling\n- [Cobra](https://github.com/spf13/cobra) — CLI framework\n\n---\n\n## License\n\n[MPL-2.0 License](https://www.mozilla.org/en-US/MPL/2.0/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanz3r%2Fdepsclean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanz3r%2Fdepsclean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanz3r%2Fdepsclean/lists"}