DEV Community

loading...

Discussion on: Delete node_modules like a Pro

Collapse
ianwijma profile image
Ian Wijma

Not sure what is wrong with rm -r node_modules

Collapse
nirazanbasnet profile image
Nirazan Basnet Author • Edited

Nothing is wrong here. With your code, we can delete just within a project, but to delete all the node_modules from the device we can use about code. Thanks!

Collapse
sharpninja profile image
The Sharp Ninja

Better Solution

Get-ChildItem /**/node_modules -Recurse | Remove-Item -Force -Recurse
Enter fullscreen mode Exit fullscreen mode
Thread Thread
itachiuchiha profile image
Itachi Uchiha

I didn't use PowerShell. But it seems a Powershell statement. Right? :P

Thread Thread
sarvasana profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Kris Kater • Edited

🤮

Thread Thread
sharpninja profile image
The Sharp Ninja

Yes, PowerShell.

Some comments have been hidden by the post's author - find out more