winget: install and update software from the command line
winget is the package manager built into Windows. Search for a program, install it by id, update everything with one command and export your list of apps to set up the next machine.
Drafted with AI from official documentation. Scripts were run in a test environment and repository links verified. Awaiting a human check. Did it work for you? Last edited Outdated?
Windows Package Manager, run as winget, does for Windows what apt does for Debian or brew for macOS: you name a program and it downloads and installs the official installer silently. It is part of Windows 11 and of Windows 10 (version 1709 and newer) through the App Installer package from the Microsoft Store. The client is open source at microsoft/winget-cli (about 26,500 stars) and the catalog of packages is maintained by the community at microsoft/winget-pkgs.
Check it is there
winget --version
winget source list
If winget is not recognized, install or update App Installer from the Microsoft Store, or download the latest release from the winget-cli GitHub page. The first run asks you to accept the source agreement.
Find a package
winget search firefox
winget search --id Git.Git
winget show Microsoft.PowerShell
Search results have a Name, an Id and a Source. Two sources exist by default: winget (the community repository, classic installers) and msstore (the Microsoft Store). Always install by Id: names are not unique and a search for “python” returns dozens of hits.
Install
winget install --id Git.Git -e --source winget
winget install --id Microsoft.PowerShell -e
winget install --id Microsoft.VisualStudioCode -e
winget install --id 7zip.7zip -e --silent
-e (--exact) matches the id exactly instead of as a substring. --silent (or -h) hides the installer’s own windows. Installers that need administrator rights trigger the normal User Account Control prompt; run the terminal as administrator to install several in one go without being asked each time.
Scripted installs often add --accept-package-agreements --accept-source-agreements so nothing waits for a keypress. Only do that for packages you have already looked at.
Update
winget upgrade # what has a newer version?
winget upgrade --id Git.Git -e
winget upgrade --all # update everything winget knows about
Careful: --all updates every recognized program in one pass, including ones you installed without winget, as long as it can match them to a package. Programs that update themselves (browsers, Teams) may show up too. There is no automatic rollback; to go back to an older version use winget install --id <Id> --version <version> with a version from winget show --id <Id> --versions.
Some entries show version unknown or refuse to upgrade because the installed program does not report its version in a way winget can read. winget pin add --id <Id> excludes a package from upgrade --all if you want to manage it by hand.
List and remove
winget list
winget list --id Git.Git
winget uninstall --id 7zip.7zip -e
Move your setup to another machine
export writes every installed package that exists in a source to a JSON file; import installs them on a fresh system. It is the quickest way to set up a new laptop.
winget export -o apps.json
winget import -i apps.json --accept-package-agreements --accept-source-agreements
Open apps.json in an editor before importing and delete anything you do not want on the new machine.
Useful settings
winget settings # opens settings.json in your editor
winget settings --enable InstallerHashOverride
The settings file controls things like progress bar style and whether winget may install from the local manifest files you write yourself. Most people never need to touch it.
Official documentation
Did this work for you?
No votes yet. Be the first.
If it did not work, the report form below tells the editors what went wrong.
See also
- 0386 Install Node.js on Linux, macOS and Windows Get Node.js and npm on any desktop OS. Use a version manager (nvm or fnm) when you work on several projects, or… Beginner · Step by step · Linux, macOS, Windows Article Installing languages & tools · Node.js 15 Oct 2026
- 0387 Install Python on Linux, macOS and Windows Install a current Python 3 with pip and venv on each desktop OS, check the version, and avoid the classic traps: python… Beginner · Step by step · Linux, macOS, Windows Article Environments & packages · Installing languages & tools 15 Oct 2026
- 0388 Install Go on Linux, macOS and Windows Install the Go toolchain from the official downloads or a package manager, set PATH so the go command and installed tools are… Beginner · Step by step · Linux, macOS, Windows Article Installing languages & tools 15 Oct 2026
- 0389 Install Java (OpenJDK) on Linux, macOS and Windows Install a current long-term-support OpenJDK with the compiler included, make java and javac available on the command line, and switch between versions… Beginner · Step by step · Linux, macOS, Windows Article Installing languages & tools 15 Oct 2026
- 0390 Install Git on Linux, macOS and Windows Install Git from your package manager, Xcode's command line tools or the Windows installer, confirm the version, and do the one-time configuration… Beginner · Step by step · Linux, macOS, Windows Article Installing languages & tools · Setup 15 Oct 2026
- 0391 Install Docker on Linux, macOS and Windows Docker Desktop or Docker Engine? Pick the right one for your OS, install it, and confirm with docker run hello-world. Covers the… Beginner · Step by step · Linux, macOS, Windows Article Docker basics · Installing languages & tools 15 Oct 2026
Repos in the wild
- Windows Terminal: tabs, panes and profiles for every shell on Windows microsoft/terminal Microsoft's modern terminal for Windows, with tabs, split panes, GPU rendering, Unicode and emoji support and profiles for PowerShell, cmd, WSL distributions and SSH connections. GitHub
History
Every saved edit is kept. The plot on the sleeve draws one line per edit. Open any edit to see exactly what changed.
- Dominik +3,553 chars