Yarn: Can yarn remove all modules?

Created on 14 Oct 2016  路  6Comments  路  Source: yarnpkg/yarn

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?

PS

yarn remove *

it doesn't work!

Thanks

cat-feature

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.

All 6 comments

@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 :)

@chuwik I'm not suggesting the no-arg route, just the functionality in general, probably with --all. There appears to be some interest on StackOveflow, for local and global.

we can use the command like

yarn remove `ls -1 node_modules | tr '/\n' ' '`

to uninstall all

http://stackoverflow.com/questions/19106284/how-do-you-uninstall-all-dependencies-listed-in-package-json-npm

@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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sebmck picture sebmck  路  3Comments

FLGMwt picture FLGMwt  路  3Comments

baptistelebail picture baptistelebail  路  3Comments

MunifTanjim picture MunifTanjim  路  3Comments

NonPolynomial picture NonPolynomial  路  3Comments