From ca8ea198866d14b57e5708052d163fdb358eb2b3 Mon Sep 17 00:00:00 2001 From: Ayush Saha <160033408+skyeyeye@users.noreply.github.com> Date: Sat, 8 Nov 2025 12:41:21 +0530 Subject: [PATCH] Add npm package uninstall instructions Added instructions for uninstalling npm packages with examples. Signed-off-by: Ayush Saha <160033408+skyeyeye@users.noreply.github.com> --- ...introduction-to-the-npm-package-manager.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/apps/site/pages/en/learn/getting-started/an-introduction-to-the-npm-package-manager.md b/apps/site/pages/en/learn/getting-started/an-introduction-to-the-npm-package-manager.md index d4c1cb6e3399d..c380d54565cba 100644 --- a/apps/site/pages/en/learn/getting-started/an-introduction-to-the-npm-package-manager.md +++ b/apps/site/pages/en/learn/getting-started/an-introduction-to-the-npm-package-manager.md @@ -90,7 +90,27 @@ You can install a specific version of a package, by running ```bash npm install @ ``` +## Uninstalling packages +To remove a package from your project, you can run: + +```bash +npm uninstall + +``` +it will install everything the project needs, in the node_modules folder, creating it if it's not existing already. +Similar to installation, you can use flags to specify which dependency section to remove from: +```bash +npm uninstall --save-dev # Remove from devDependencies +npm uninstall --save-optional # Remove from optionalDependencies +``` +Examples +```bash +npm uninstall lodash # Remove from dependencies +npm uninstall -D jest # Remove from devDependencies +npm uninstall --save-optional chalk # Remove from optionalDependencies + +``` ## Running Tasks The package.json file supports a format for specifying command line tasks that can be run by using