Uninstall node modules

How to uninstall all node modules and all folders i dont need anymore in my project i want to complete rework my site with as less as possible memory.

Hi @RobinSchapendonkGame! I think that if you remove the packages from your package.json file, and then also run rm -rf node_modules, it will wipe out the old node modules and re-install only the packages that remain in your package.json file. You should be able to use the same command for any directory in your project – then run refresh to have those changes reflected in the editor!

Let me know if anything in this is unclear, needs more details (or if I’ve misunderstood the question!)

You can simply remove the package from the dependencies field and run refresh command in the console.

1 Like

This is true! Sorry @RobinSchapendonkGame – to be clear, you shouldn’t have to run the rm -rf command, it should by default uninstall those node modules, but you can run rm -rf if for whatever reason that doesn’t seem to work, I should have clarified that.