WinGet, the package manager that comes bundled with Windows 11, often goes unnoticed by users, as Microsoft has placed it behind a command line interface and has not actively promoted its features. However, for those who seek a more efficient way to install applications, WinGet offers a streamlined alternative to traditional download pages and installers that often come with unwanted extras, like browser extensions. Microsoft has documented a total of eighteen commands, but only seventeen are essential for the average Windows 11 user looking to install applications from the repository.
To begin, users should first verify that WinGet is installed on their system. This can be accomplished by executing the following command in Windows Terminal, PowerShell, or Command Prompt:
winget --version
If a version number appears, you are set to go. If not, it may indicate that WinGet is either missing or not properly configured in your system’s PATH, a common issue for machines upgraded from Windows 10.
Winget Commands You Should Know
1. winget search
winget search firefox
This command allows users to find packages by name, publisher, or moniker. The results will display the Name, Id, Version, and Source, with the Id being crucial for subsequent commands. For example, while you might expect “Firefox” to be simply “Firefox,” its actual Id is “Mozilla.Firefox.” This search function helps prevent the installation of unintended packages.
2. winget show
winget show --id Mozilla.Firefox
When search results yield multiple packages with similar names, this command provides detailed information about the selected package, including publisher, version, license, homepage, installer type, and download URL, helping users distinguish between official builds and forks or repackaged versions.
3. winget install
winget install -e --id Mozilla.Firefox
Using the -e flag ensures that the installation targets the exact package Id. This is particularly important to avoid fuzzy matches that could lead to installing the wrong application.
4. Install a specific version
winget install -e --id Mozilla.Firefox --version 128.0
This command allows users to specify a particular version of an application, which can be crucial if a newer release introduces issues or if consistency across multiple machines is required.
5. Install silently
winget install -e --id 7zip.7zip --silent --accept-package-agreements --accept-source-agreements
The --silent option suppresses the installer interface, while the agreement flags allow the installation to proceed without user prompts. This is particularly useful for scripting or batch installations.
6. winget list
winget list
This command displays all applications installed on the machine, including those installed manually. Users can refine their search by adding specific terms:
winget list adobe
7. See what has updates waiting
winget upgrade
This command lists installed packages that have newer versions available, showing both current and available versions. Some entries may appear with an “Unknown” version, indicating that WinGet cannot determine the installed version due to the application being installed outside its purview.
8. Update everything at once
winget upgrade --all --include-unknown --silent --accept-package-agreements --accept-source-agreements
This command updates all packages with available newer versions without prompting for user input. Notably, the --include-unknown flag is essential, as it ensures that applications with unknown versions are also updated.
9. winget uninstall
winget search firefox
0
This command removes a package, including those installed outside of WinGet, as long as they are listed in the output of winget list. The --silent flag can also be applied here for use in cleanup scripts.
10. winget export
winget search firefox
1
This command generates a JSON file containing a list of installed packages, serving as a useful backup before a clean install or when transferring a machine to another user.
11. winget import
winget search firefox
2
By using this command, users can reinstall all applications from an exported file, streamlining the process of setting up a system after a clean install.
12. winget pin
winget search firefox
3
This command prevents a package from being updated during a general upgrade, which is useful for applications that may break functionality with newer versions.
13. winget download
winget search firefox
4
This command retrieves the installer for an application without executing it, making it convenient for offline installations or for distributing the same installer across multiple machines.
14. winget repair
winget search firefox
5
This command initiates the repair routine for an application, provided that the package manifest supports such functionality.
15. winget source
winget search firefox
6
WinGet accesses two primary sources: the community repository and the Microsoft Store. Users can list configured sources or reset them to default settings, which often resolves various issues.
16. winget settings
winget search firefox
7
This command opens the WinGet settings file in the default JSON editor, allowing users to customize installation preferences and update behaviors.
17. winget configure
winget search firefox
8
This command applies a configuration file that outlines desired package installations and settings, although it requires the DSC module and is typically used for more advanced setups.
Commands You Can Safely Ignore
Among Microsoft’s documented commands, three are primarily intended for package publishers rather than end-users:
winget hashgenerates a SHA256 for an installer file.winget validatechecks a manifest before submission to the repository.winget dscv3exposes DSC v3 resources for configuration tooling.
These commands can be disregarded by most users unless they are involved in package submission.
If WinGet Is Not Recognised
Should you encounter issues with WinGet not being recognized, it typically stems from one of the following reasons:
- The App Installer package is missing, particularly on machines upgraded from Windows 10. Installing the App Installer from the Microsoft Store can resolve this.
- The PATH entry is missing, even if WinGet is present. Signing out and back in can refresh the environment settings.
- You are running it as SYSTEM or in an unsupported context; WinGet is designed to operate under a signed-in user account.
FAQ
Is WinGet safe to use? Yes, the default source is Microsoft’s community repository, where package manifests undergo review, ensuring a level of safety compared to random download pages.
Does WinGet work on Windows 10? Absolutely, it is compatible with Windows 10 version 1809 and later via the App Installer package.
Why does winget upgrade miss some apps? This can occur if applications installed outside of WinGet report an Unknown version or if they are not available in the repository.
Can I use WinGet instead of the Microsoft Store? For most desktop applications, yes. Store apps can still be accessed through the msstore source.
Do I need administrator rights? Not for all commands; user-level installations do not require elevation, but machine-wide installations do.