Multiple node_modules directories on Windows

Due to all of the problems I’ve had upgrading to 1.6 due to duplicate files in various node_module directories, I’d like to get rid of everything I don’t need and do a clean install using choco, but at this point, I don’t know what is safe to delete. I’ve been updating Meteor for my project since 1.1.4 and have what would seem to be lots of unneeded node_module directories. I have one under

Users/Ron/myProject

that I believe should just contain modules that myProject needs, there is one under

Users/Ron/myProject/.meteor/local/build/programs/server/npm

that I’m guessing is created as part of the build process, one under

Users/Ron/AppData/Local/.meteor/packages/meteor-tool/1.6.0/mt_os.windows.x86_*/dev_bundle/lib

that contains the modules Meteor needs, one under

AppData/Roaming/npm

which I think are global npm installs, and one under

Users/Ron

that I have no idea what is used for.

In addition, under the AppData/.../meteor-tool directory I have multiple old installs.

My question is, what can I delete? I would guess the entire AppData/Local/.meteor directory can be removed, and possibly the one under Users/Ron. If I remove the one under myProject will it get recreated after I install 1.6.0 64-bit and I do the first rebuild of myProject?

Can anyone provide some guidance? Or am I going to have to make a copy of everything and then do it via trial and error?

If you upgrade to 1.6 using the choco installation method it should clean out your Users/Ron/AppData/Local/.meteor/ directory itself. If not, it is safe for you to do so too.

The node_modules in your project will need to be wiped and re-installed because of the major version jumps in V8 going to Meteor 1.6 / Node 8.

Also wipe myProject/.meteor/local with meteor reset

As for the two non-meteor directories, they will probably contain modules your editor is using and any other non-meteor tools you use on the command line