Following Yarn#Installation guide to installing the [email protected]
package manager using below command:
corepack prepare [email protected] --activate
yarn -v
3.4.1
Now, I want to deactivate or downgrade the Yarn to the previous version in the system. The previous version is v1. I didn't find any command or option for corepack to do this.
⚡ corepack -h
━━━ Corepack - 0.12.1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$ corepack <command>
━━━ General commands ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
corepack disable [--install-directory #0] ...
Remove the Corepack shims from the install directory
corepack enable [--install-directory #0] ...
Add the Corepack shims to the install directories
corepack hydrate [--activate] <fileName>
Import a package manager into the cache
corepack prepare [--activate] [--all] [--json] [-o,--output] ...
Generate a package manager archive
You can also print more details about any of these commands by calling them with
the `-h,--help` flag right after the command name.
corepack prepare [email protected] --activate
downgraded mine from
[email protected]
Let me know if there is a better way.