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

Docs lack how to uninstall Yarn 2 #2244

Closed
desmap opened this issue Dec 16, 2020 · 14 comments
Closed

Docs lack how to uninstall Yarn 2 #2244

desmap opened this issue Dec 16, 2020 · 14 comments

Comments

@desmap
Copy link

desmap commented Dec 16, 2020

There are no docs and it's discouraged to rm .yarn in #1733 so what should we do?

This is crucial since Yarn 2 creates anomalies with other stuff, eg CRA but this should not be the focus here. I need to get Yarn 2 from my system or I must re-setup my machine :/

Edit: I changed the title bc the main issue is that there are no docs to get rid of berry; after 30 min of googling, reading tons of SO replies you know how to get there but man, this is not a nice UX and leaves users grumpy. You, we, nobody has time. FWIW and again, Yarn 2 totally messes up CRA if anyone cares.

@desmap desmap changed the title Yarn 2 can't be uninstalled Docs lack how to uninstall Yarn 2 Dec 16, 2020
@arcanis arcanis closed this as completed Dec 16, 2020
@arcanis
Copy link
Member

arcanis commented Dec 16, 2020

The doc clearly states that the install is project-local. If you derive from it that you need to reinstall your machine to switch back to something else, you missed something.

@merceyz
Copy link
Member

merceyz commented Dec 16, 2020

FWIW and again, Yarn 2 totally messes up CRA if anyone cares.

Yarn 2 doesn't mess up CRA, PnP highlights the issue in CRA which just happens to work under the old node_modules layout which is suggested to enable in the migration guide for the initial migration, which I'm assuming you skipped https://yarnpkg.com/getting-started/migration

The fix for CRA has been sitting there for months, if you want to complain, this is the wrong place facebook/create-react-app#9872

@winstonDeGreef
Copy link

But how do you uninstall Yarn?

@hades200082
Copy link

Yarn v2+ has caused me so many issues. I just want it gone off of my machine.

I've tried corepack disable I've tried npm install -g yarn to go back to v1 but nothing works. Please explain how to get rid of Yarn v2+ and revert to classic Yarn until yarn v2+ & pnpm can just work without issue on projects.

@NoirVoider
Copy link

Yarn v2+ has caused me so many issues. I just want it gone off of my machine.

I've tried corepack disable I've tried npm install -g yarn to go back to v1 but nothing works. Please explain how to get rid of Yarn v2+ and revert to classic Yarn until yarn v2+ & pnpm can just work without issue on projects.

I have same problem, And after the upgrade, the package installed globally in yarn v1 cannot be uninstalled normally. yarn global Command deleted 🤯🤯🤯

@jonmnoj
Copy link

jonmnoj commented Mar 26, 2023

Using yarn set version classic worked for me when I needed to revert it for a project

@samuel-pipelaunch
Copy link

Using yarn set version classic worked for me when I needed to revert it for a project

That worked for me. Thanks 👍

@nikki-cat
Copy link

to anyone having issues with this on Windows, make sure you also delete your "yarnrc.yml" both in local project and your user folder, as that will also affect which version the system thinks it needs to use.

@seferin-x
Copy link

None of the 'standard' ways of uninstalling worked for me on windows 10.

In the end I delete all files yarn* from:

c:\Users<USER>\AppData\Roaming\npm

This worked straight away. Im not sure how safe this approach is.

@architchandra
Copy link

architchandra commented Jul 17, 2023

Came here after looking everywhere about how to uninstall Yarn. Would love better documentation on this. Thanks.

I tried using yarn set version classic but it created config files in my project that I wasn't happy with (not allowed to commit non-task related changes). Had to revert.

A Stack Overflow thread helped me with what looks to be a global downgrade method:
corepack prepare yarn@1.22.19 --activate

Not sure if this method is correct but it worked for me.

@riungemaina
Copy link

So you can't remove yarn? any of the replace options do not work for me.

@Dan503
Copy link

Dan503 commented Feb 26, 2024

I needed to run these commands:

npm uninstall corepack -g
npm i yarn -g

I also had to downgrade node to v18.19.1

@hedaetul
Copy link

Yarn v2+ has caused me so many issues. I just want it gone off of my machine.

I've tried corepack disable I've tried npm install -g yarn to go back to v1 but nothing works. Please explain how to get rid of Yarn v2+ and revert to classic Yarn until yarn v2+ & pnpm can just work without issue on projects.

I am also suffering from this issue.

@sdwvit
Copy link

sdwvit commented Mar 19, 2024

corepack is a disaster, had to follow Dan503's advice

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