When I input the command
yarn remove
But it warned me
error Not enoguh arguments, expected at least 1
So Does the yarn support the remove all?
yarn remove *
it doesn't work!
@kittens Is this a feature (e.g. --all) you'd like to have in yarn? npm does not appear to support it, but might be nice to have if there is not a landmine in implementing such a thing.
What would the scenario be for wanting to remove all dependencies? In my opinion having 'yarn remove' removing all packages could be a bit dangerous, since you could enter that by mistake and end up removing all...
'yarn remove *' would be a better syntax in my opinion, as @monkindey suggests, but again not sure if this is something that people do in their day to day work enough that it'd be worth supporting it.
I'm not a main contributor in the project, but here's my 2 cents in any case :)
we can use the command like
yarn remove `ls -1 node_modules | tr '/\n' ' '`
to uninstall all
@monkindey Yes, but supposedly doesn't work for Windows
based on the decision in #1284 I am going to close this. If you feel strongly about this solution. Please open an issue here https://github.com/yarnpkg/rfcs
thanks everyone!
Most helpful comment
@kittens Is this a feature (e.g. --all) you'd like to have in yarn? npm does not appear to support it, but might be nice to have if there is not a landmine in implementing such a thing.