Skip to content

feat(cli): add cleanup cache command - #8016

Open
viceice wants to merge 1 commit into
viceice/feat/cleanup-downloadsfrom
viceice/feat/cleanup-cache
Open

viceice wants to merge 1 commit into
viceice/feat/cleanup-downloadsfrom
viceice/feat/cleanup-cache

Conversation

@viceice

@viceice viceice commented Oct 26, 2026

Copy link
Copy Markdown
Member

Changes

  • New containerbase-cli cleanup cache [--dry-run] command.
  • Install services declare their cache folders below /tmp/containerbase/cache (cacheDirs), eg. .npm/_cacache, .m2/repository, .gradle/caches, go/pkg/mod, .cargo/registry; config files next to them are kept.
  • Also empties .cache and the virtualenv cache; the download cache is left to cleanup downloads.
  • Tries every path and fails at the end when one couldn't be removed.
  • Part of feature request: Integrate cleanup into the install-tool #4362.

Context

Please select one of the following:

  • This closes an existing Issue, Closes: cleanup: add cleanup cache command #5430
  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI-generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

Code, tests and docs by Claude Code (Claude Opus 5.5), reviewed by @viceice.

Use of AI in replying to PR comments

Who answers review comments:

  • @viceice will read and reply directly. Name the account.
  • An agent will draft replies and @username will read them before they are posted. Name the account.
  • An agent will draft replies and reply autonomously. This is heavily discouraged, and we prefer that there are humans in the loop
  • Nobody has explicitly committed to replying.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified tests

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dd2d0fc0-db8b-46af-998b-988ae15a3a59
Commits

Reviewing files that changed from the base of the PR and between 28154aa and a351d77.

Files selected for processing: 25
  • docs/new-tool.md
  • docs/tool-installer-best-practices.md
  • docs/tools.md
  • src/cli/cleanup/cleanup-cache.service.spec.ts
  • src/cli/cleanup/cleanup-cache.service.ts
  • src/cli/cleanup/index.spec.ts
  • src/cli/cleanup/index.ts
  • src/cli/command/cleanup-cache.spec.ts
  • src/cli/command/cleanup-cache.ts
  • src/cli/command/index.ts
  • src/cli/install-tool/base-install.service.ts
  • src/cli/install-tool/index.ts
  • src/cli/tools/dart/index.ts
  • src/cli/tools/dart/utils.ts
  • src/cli/tools/dotnet/index.ts
  • src/cli/tools/erlang/elixir.ts
  • src/cli/tools/flutter.ts
  • src/cli/tools/golang.ts
  • src/cli/tools/java/index.ts
  • src/cli/tools/java/sbt.ts
  • src/cli/tools/node/index.ts
  • src/cli/tools/python/conan.ts
  • src/cli/tools/ruby/cocoapods.ts
  • src/cli/tools/ruby/index.ts
  • src/cli/tools/rust.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@viceice
viceice added this pull request to stack #8019 October 26, 2026 13:05
@viceice
viceice force-pushed the viceice/feat/cleanup-cache branch 2 times, most recently from 74c2a6f to 067b273 Compare October 26, 2026 14:19
@viceice
viceice force-pushed the viceice/feat/cleanup-cache branch from 067b273 to 3e78ade Compare October 26, 2026 16:15
Co-Authored-By: Claude Opus 5.5 <michael.kriese+claude-code@mend.io>
@viceice
viceice force-pushed the viceice/feat/cleanup-cache branch from 3e78ade to a351d77 Compare October 26, 2026 16:59
@viceice
viceice marked this pull request as ready for review October 26, 2026 17:05
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@viceice
viceice enabled stacked auto-merge October 26, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cleanup: add cleanup cache command

1 participant