Linux command
npm-uninstall 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Uninstall package
npm uninstall [package-name]
Uninstall and remove from dependencies
npm uninstall --save [package-name]
Uninstall global package
npm uninstall -g [package-name]
Uninstall multiple packages
npm uninstall [pkg1] [pkg2]
说明
npm uninstall removes packages from node_modules and optionally from package.json. Also removes unused dependencies. Aliases: npm rm, npm remove, npm un.
参数
- -g, --global
- Uninstall global package.
- --save
- Remove from dependencies.
- --save-dev
- Remove from devDependencies.
FAQ
What is the npm-uninstall command used for?
npm uninstall removes packages from node_modules and optionally from package.json. Also removes unused dependencies. Aliases: npm rm, npm remove, npm un.
How do I run a basic npm-uninstall example?
Run `npm uninstall [package-name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -g, --global do in npm-uninstall?
Uninstall global package.