To remove it from the dependencies in package.json, you will need to use the save flag:
npm uninstall --save webpack
If you have installed the package as a "devDependency" (i.e. with --save-dev) then --save won't remove it from package.json. You need to use --save-dev to uninstall it. Here is the outcome of the above command
$ npm ls @ngtools/webpack [email protected] C:\Apache24\htdocs\angularapp +-- @angular-devkit/[email protected] | `-- @ngtools/[email protected] `-- @ngtools/[email protected]
$ npm uninstall --save webpack > [email protected] install C:\Apache24\htdocs\angularapp\node_modules\node-sass > node scripts/install.js Cached binary found at C:\Users\user\AppData\Roaming\npm-cache\node-sass\4.9.3\win32-x64-59_binding.node > [email protected] postinstall C:\Apache24\htdocs\angularapp\node_modules\node-sass > node scripts/build.js Binary found at C:\Apache24\htdocs\angularapp\node_modules\node-sass\vendor\win32-x64-59\binding.node Testing binary Binary is fine added 1106 packages in 677.641s
$ npm ls @ngtools/webpack [email protected] C:\Apache24\htdocs\angularapp `-- @angular-devkit/[email protected] `-- @ngtools/[email protected]