Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to List All PNPM Versions Installed via Corepack #553

Open
chenlei0608 opened this issue Aug 28, 2024 · 4 comments
Open

How to List All PNPM Versions Installed via Corepack #553

chenlei0608 opened this issue Aug 28, 2024 · 4 comments

Comments

@chenlei0608
Copy link

I've installed multiple versions of PNPM using Corepack. Could you please provide a way to list all the PNPM versions installed through Corepack?

@aduh95
Copy link
Contributor

aduh95 commented Aug 28, 2024

On non-Windows: ls "${COREPACK_HOME:-${XDG_CACHE_HOME:-$HOME/.cache}/node/corepack}/pnpm/"

On Windows, I'm less familiar, it should either be in %COREPACK_HOME%, or %LOCALAPPDATA%/node/corepack/pnpm, or ~/.cache/node/corepack/pnpm.

@chenlei0608
Copy link
Author

Thanks, it is in %LOCALAPPDATA%/node/corepack/pnpm. It would be great if we could directly use commands to view, uninstall, and install pnpm versions, just like with nvm.

@aduh95
Copy link
Contributor

aduh95 commented Aug 29, 2024

There are no proper CLI for that atm. On a related note, it is possible to install and uninstall versions with the following commands:

  • To install a specific version to use as the "global": corepack install -g [email protected]; if you only want to download it without changing the global, you can also do e.g. corepack [email protected] --version
  • To remove all installed versions: corepack cache clean

@chenlei0608
Copy link
Author

Thanks, it helped me

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

No branches or pull requests

2 participants