How to remove the packages using Angular CLI
In this tutorial, we will learn about how to remove the installed packages using the angular cli.
When we add a new package to the angular app using ng add <package-name>
command, angular
cli will download the package and its dependencies then invoke the installation script that can update your project configuration in angular.json
file and app.module.ts
file.
To remove the package, angular cli doesn’t provide us any command like ng remove
or some other, instead of we can use the npm uninstall
command which removes the package from package.json
file and node_modules
folder.
Example:
npm uninstall apollo-angular
This above command removes the apollo-angular
package from your node_modules
folder and package.json
file.
It tells us, we need to manually remove the dependency packages and configuration settings from the app.module.ts
file and angular.json
file.