by Sai gowtham

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.

Top Udemy Courses

JavaScript - The Complete Guide 2020 (Beginner + Advanced)
JavaScript - The Complete Guide 2020 (Beginner + Advanced)
45,614 students enrolled
52 hours of video content
View Course
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
284,472 students enrolled
40 hours of video content
View Course
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
130,921 students enrolled
21 hours of video content
View Course