How to remove package using Angular CLI?

Dmitry Grinko picture Dmitry Grinko · May 12, 2018 · Viewed 98.1k times · Source

Angular 6 has new CLI command ng add <package>.

How can I remove the package using Angular CLI?

UPDATE

documentation

ng add will use your package manager to download new dependencies and invoke an installation script (implemented as a schematic) which can update your project with configuration changes, add additional dependencies (e.g. polyfills), or scaffold package-specific initialization code

It is not the same npm install <package>

I was trying to use ng rm but it is not working yet.

Answer

Nour picture Nour · May 12, 2018

You can use npm uninstall <package-name> will remove it from your package.json file and from node_modules.

If you do ng help command, you will see that there is no ng remove/delete supported command. So, basically you cannot revert the ng add behavior yet.