Install Packages
Install all dependencies from package.json
$npm install
Install a specific package
$npm install <package-name>
Install as dev dependency
$npm install <package-name> --save-dev
Install globally
$npm install -g <package-name>
Uninstall a package
$npm uninstall <package-name>
Update Dependencies
Tip: Always review changelogs before running major updates in production.
Check outdated packages
$npm outdated
Update all packages to latest compatible versions
$npm update
Update a specific package
$npm update <package-name>
Audit for security vulnerabilities
$npm audit
Auto-fix audit vulnerabilities
$npm audit fix
Clear npm cache
$npm cache clean --force