Skip to content

Provide a way to clean Vite+ managed cache #1983

Description

@liangmiQwQ

Description

$ du -sh ~/.vite-plus/* | sort -h
...
1.4G    /Users/liangmi/.vite-plus/package_manager
6.4G    /Users/liangmi/.vite-plus/js_runtime

As Vite+ is used to manage Node.js runtime in more and more projects, our js_runtime directory can easily get big, as well as package_manager. Some of them may be only used for little time.

For js_runtime, we can use vp env list to see all the downloaded Node.js version, and we can remove unused ones by hand. For package_manager, however, as far as I know, Vite+ doesn't provide a way to list / remove them.

Suggested solution

We can take a look at corepack, corepack doesn't directly provide commands like list / uninstall, but it has corepack cache clean command, allows users to remove all downloaded package managers.

We may provide a similar command, like vp env clean, it will delete all installed Node runtime (except the current using one and default one) and package managers (as well as corepack managed ones)

Alternative

We can also provide a way to list the installed package managers and a way to remove them, but I think it is quite useless, and not so easy-to-use as a clean command honestly.

Additional context

N / A

Validations

  • Read the Contributing Guidelines.
  • Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
  • Check that there isn't already an issue requesting the same feature.

Metadata

Metadata

Assignees

Priority

None yet

Start date

None yet

Target date

None yet

Effort

None yet

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions