winget
winget, the Windows Package Manager, installs and updates software with one typed command.
Novice · Operating System · Software Development · Updated
After this lesson you can
- Find a package's id with winget search, and explain what --id and -e do in an install command
- Choose the winget command that searches, lists or upgrades your software
Key takeaways
- winget comes with Windows 11 and installs software with one command, with no download pages to click through.
- Every package has an id. winget search finds it, and install -e --id installs exactly that package.
- winget list shows what is installed, and winget upgrade shows what has an update.
- Adding --interactive shows the installer's own windows, so you can make its choices yourself.
Windows only. On a phone, you get an app from the app store: search, tap, done. You never hunt for a download page. winget, the Windows Package Manager, gives your computer the same thing, from the terminal. It comes with Windows 11.
Install with one command
Type one command, and winget finds the right download, runs the installer, and keeps track of what it installed. For example, this command installs VS Code:
winget install -e --id Microsoft.VisualStudioCode
Every package has an id, such as Microsoft.VisualStudioCode. --id tells winget which package you mean, and -e (exact) tells it to match that id exactly, so it never picks a package with a similar name.
Find a package's id
When you don't know a package's id, search for it by name:
winget search node
winget lists the packages that match, with a Name, an Id and a Version column. Copy the id from the Id column into your install command.
More commands you'll use
| Command | What it does |
|---|---|
winget search node |
Finds packages that match "node", such as Node.js, and shows their ids |
winget list |
Lists the software installed on your computer |
winget upgrade |
Lists software that has an update available |
winget upgrade --all |
Installs every available update |
Some installers ask questions, such as which features to include. Adding --interactive to an install command shows the installer's own windows, so you can make those choices yourself. You will do this for a few of the tools you install, such as Git.
You will check that winget works in the first Setup exercise of this topic, then use it to install every other tool.
Try it. In Windows Terminal, run winget list, and find a program you know you have installed, such as your web browser.
Check yourself
2 questions to try on the lesson page.
So what
One command per tool means your whole setup can be repeated, checked and fixed by typing, instead of remembering where you clicked.
Key terms
- Package Manager
- winget