I installed windows-build-tools using the following command:
npm install --global --production windows-build-tools
Now I want to uninstall it. So I entered the following command:
npm --vcc-build-tools-parameters='[""/Uninstall""]' install --global windows-build-tools
But I am unable to uninstall it. I get the following output:
C:\WINDOWS\system32>npm --vcc-build-tools-parameters='[""/Uninstall""]' install --global windows-build-tools
> [email protected] postinstall C:\Users\pkim\AppData\Roaming\npm\node_modules\windows-build-tools
> node ./lib/index.js
Downloading BuildTools_Full.exe
Downloading python-2.7.13.msi
[> ] 0.0% (0 B/s)
Downloaded python-2.7.13.msi. Saved to C:\Users\pkim\.windows-build-tools\python-2.7.13.msi.
Starting installation...
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!
Waiting for installers... -Successfully installed Python 2.7
Waiting for installers... -Successfully installed Visual Studio Build Tools.
+ [email protected]
added 128 packages in 72.392s
How can I uninstall windows-build-tools? Am I using /Uninstall parameter incorrectly?
I looked at #51 and it suggests uninstalling Microsoft Visual C++ Build Tools from Program & Features settings in Windows. If so, what is the use of /Uninstall parameter?
What worked for me
"BuildTools_Full.exe /Uninstall /Force /S"It's not the most elegant but it gets the job done. The alternative was to script in PowerShell which I know nothing about. See this repository ps1/launch-installer.ps1 where I adapted the script from
Am I using /Uninstall parameter incorrectly?
Definitely not. Your command line is installing windows-build-tools via npm. You're just telling it to pass /Uninstall to the build tools while doing so.
You probably want to do what @ammonvictor suggested and npm uninstall the module itself.
We sadly don't remove the Visual Studio C++ Build tools or Python when you uninstall. I've updated the title of he issue.
I'm frankly a bit afraid of breaking too many user's environments when we auto-remove anything from the system, but npm's hooks would allow us to run code and therefore remove the C++ Build Tools and/or Python programmatically.
I'd love to see a PR!
Most helpful comment
What worked for me
"BuildTools_Full.exe /Uninstall /Force /S"It's not the most elegant but it gets the job done. The alternative was to script in PowerShell which I know nothing about. See this repository ps1/launch-installer.ps1 where I adapted the script from