Handbook
CLI Cheatsheet

Package managers CLI Commands Cheatsheet

Last updated by Noel Varanda (opens in a new tab),
npm
yarn
pnpm
cheatsheet

Here's a handy cheatsheet summarizing the commonly used commands for npm, yarn, and pnpm:

Commandpnpmyarnnpm
Install dependenciespnpm installyarn installnpm install
Update dependenciespnpm updateyarn upgradenpm update
Run a scriptpnpm run <script-name>yarn run <script-name>npm run <script-name>
Add a development dependencypnpm add -D <package>yarn add <package> -Dnpm install <package> -D
Remove a dependencypnpm remove <package>yarn remove <package>npm uninstall <package>
Check for outdated dependenciespnpm outdatedyarn outdatednpm outdated
List installed packagespnpm listyarn listnpm list
Clean cachepnpm cache cleanyarn cache cleannpm cache clean

Keep up to date with any latest changes or announcements by subscribing to the newsletter below.