npm just store your packages in the folder node_modules. Search for this folder where you have your node installed. Remove the folder of the package you want to remove. Check your packages.json and ensure you have not references to angular 2 or remove those. run npm clean cache
. run npm install
. It is the same if you run npm uninstall
as @Mike McCaughan says
PD. @Mike McCaughan said true. I feel you are not clear about the concept.
Edit. By manual way u need to remove variables of your path variables in your OS if you have installed something that adds any.
Edit: I was thinking if you was not able to run npm uninstall
because u was not doing with -g
option. When you install node you are provided with 'Node Package Manager'. And let you use it in your system by adding a path variable to your command shell. In itself, node uses this npm to manage his own dependencies when you specify -g
(global) option.
Any place you have a packages.json file if you navigate there and run npm [whatever] it will have effect on this path not global, and will create the node_modules folder to store packages in this same folder. With dependencies you specify in this packages.json.
Unless you specify -g. Then you refer to the packages of your node instance located where you have installed node. The purpose is modular dependencies through NPM. I hope I have made myself understood.
Another option is when you execute npm install with the option --save (-g or not)
Then you will save that package to your packages.json and everytime you run npm install
it will be taken into account and installed.
Last is when you specify --save-dev instead
Then you say you only want the package for your development environment. You will find there are different places for dependencies and dev-dependencies in you packages.json
Last edit promised: One thing wrong I said is that it is stored in your root folder where you installed node. It is not. It is instantiated per user of the OS. If you are using windows you will find {user}/AppData/Roaming/npm
You will find there all packages you install globally