How to uninstall a globally installed package with Yarn?
Asked Answered
P

3

28

I installed Quasar framework using Yarn:

yarn global add @quasar/cli

However there seems to be an issue with the installation and I now need to remove the global package. I checked the Yarn docs and they have a remove command but it does not seem to be global. I know NPM allow for global remove with:

npm uninstall -g @quasar/cli

How can I do the same with Yarn?

Power answered 27/2, 2021 at 18:14 Comment(0)
A
46

you have to read yarn documentation

yarn global remove @quasar/cli

https://classic.yarnpkg.com/en/docs/cli/global

Ackack answered 28/2, 2021 at 20:43 Comment(1)
If you installed a global package with sudo, it might have been installed to /usr/local/bin instead. (You can check with which <command>.) In that case, you will have to use sudo to uninstall it as well.Richart
I
1

In Linux:

which <the package name: packageXYZ>

output: /home/user1234/.nvm/versions/node/v16.13.0/bin/packageXYZ

go there and delete it!

Ideal answered 17/1, 2022 at 5:18 Comment(0)
C
0

I tried to delete with yarn global remove <package_name> but in my MacOS, sudo yarn global remove <package_name> works and I tried to remove expo-cli. Replace <package_name> with package you want to remove.

Cislunar answered 14/9, 2023 at 23:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.