Skip to main content
Get up and running with WinGet by installing your first package and learning essential commands.

Prerequisites

Before you begin, ensure WinGet is installed on your system. See the Installation Guide if you haven’t installed it yet. Verify WinGet is installed:
winget --version

Your First Package Installation

Let’s install a popular package to get familiar with WinGet.
1

Search for a package

Search for available packages using winget search:
winget search "visual studio code"
This returns a list of packages matching your search term with their IDs and sources.
2

Install the package

Install a package using its ID:
winget install Microsoft.VisualStudioCode
WinGet will download and install the package automatically. You may be prompted for administrator permissions.
3

Verify installation

Check that the package was installed successfully:
winget list "visual studio code"
This shows all installed packages matching the search term.

Essential Commands

Here are the most commonly used WinGet commands to get you started:

Search for Packages

Find packages in the WinGet repository:
# Search by name
winget search firefox

# Search with filters
winget search --name "Visual Studio" --source winget

Install Packages

Install packages by ID or name:
# Install by exact ID
winget install Mozilla.Firefox

# Install specific version
winget install Microsoft.PowerShell --version 7.4.0

# Install with custom location
winget install Git.Git --location "C:\Tools\Git"

List Installed Packages

View packages installed on your system:
# List all installed packages
winget list

# Search installed packages
winget list firefox

# Show packages with available upgrades
winget upgrade

Upgrade Packages

Keep your software up to date:
# Upgrade all packages
winget upgrade --all

# Upgrade specific package
winget upgrade Microsoft.PowerShell

# Preview upgrades without installing
winget upgrade --all --include-unknown

Uninstall Packages

Remove packages you no longer need:
# Uninstall by ID
winget uninstall Mozilla.Firefox

# Uninstall interactively
winget uninstall firefox

Show Package Details

Get detailed information about a package:
winget show Microsoft.VisualStudioCode
This displays the package version, publisher, description, homepage, license, and available installers.

Working with Sources

WinGet uses package sources to discover and install software. By default, two sources are configured:

List Sources

winget source list

Update Sources

Refresh package metadata from sources:
# Update all sources
winget source update

# Update specific source
winget source update --name winget

Common Workflows

Setting Up a New Development Environment

Install multiple packages at once:
winget install Microsoft.VisualStudioCode
winget install Git.Git
winget install Microsoft.WindowsTerminal
winget install GitHub.GitHubDesktop
winget install Microsoft.PowerShell
Or use a configuration file with winget import (see Import/Export).

Keeping Your System Updated

Create a routine to keep all packages current:
# Check for updates
winget upgrade

# Update all packages
winget upgrade --all
Add --silent to commands to skip installer prompts and use default options.

Finding the Right Package

When searching, use package IDs for precision:
# Search returns multiple results
winget search python

# Install using exact ID
winget install Python.Python.3.11
Package IDs are case-sensitive. Use winget show <id> to verify the exact ID before installing.

Understanding Package Sources

WinGet can install from multiple sources:
  • winget source: Community-maintained packages
  • msstore source: Microsoft Store apps
  • Private sources: Enterprise or custom repositories
Specify a source explicitly:
winget install --source winget Microsoft.PowerShell
winget install --source msstore "Microsoft To Do"

Managing Settings

Configure WinGet behavior through settings:
winget settings
This opens settings.json in your default editor. Common settings include:
  • Progress bar style
  • Default installation behavior
  • Network configuration
  • Experimental features
See Configuration Settings for details.

Administrator Privileges

Some packages require administrator privileges to install. WinGet behavior varies based on your permissions:
When running WinGet as administrator, installers run with elevated privileges without additional prompts. Only install trusted software.
Non-administrator prompt:
  • Windows will prompt you to elevate if the installer requires it
  • You can decline elevation, but the installation will fail
Administrator prompt:
  • No elevation prompts appear
  • All installers run with elevated privileges

Troubleshooting

If you encounter issues:
WinGet may not be on your PATH. Restart your terminal or see Troubleshooting for solutions.
Update your sources with winget source update and try again. The package may not be available in the default sources.
Check if you need administrator privileges. Run your terminal as administrator and try again.
Ensure you have internet connectivity and check proxy settings in Configuration Settings.
For more help, see the complete Troubleshooting Guide.

Next Steps

Command Reference

Explore all available WinGet commands

Settings

Customize WinGet behavior and preferences

Package Sources

Learn about sources and add private repositories

PowerShell Module

Use WinGet from PowerShell scripts

Build docs developers (and LLMs) love