Winget (Windows Package Manager) is a command-line tool built into Windows 11 that lets you install, upgrade, and remove software from the official Microsoft Store and many popular publishers. Instead of visiting websites and running installers manually, you type one command and winget handles the download and setup. This guide walks you through the essential commands, from finding software to batch-updating everything, and covers the common pitfalls.
What You’ll Need
- Windows 11 (winget is preinstalled on most recent versions; if not, update via the Microsoft Store).
- An internet connection.
- Administrator rights for some installs (the terminal will prompt you if needed).
- Basic comfort with the Command Prompt, PowerShell, or Windows Terminal.
Step-by-Step
- Open a terminal. Press Win + X and select “Terminal” or “Windows Terminal”. You can also search for “cmd” or “PowerShell” in the Start menu. For most commands, a regular user window works; for system-wide installs, you may need to run as administrator (right-click the terminal icon and choose “Run as administrator”).
- Check that winget is available. Type
winget --versionand press Enter. If you see a version number (e.g.,v1.7.10582), you’re ready. If you get “not recognized”, update Windows or install the App Installer from the Microsoft Store. - Search for a package. Use
winget search <keyword>. For example,winget search vlcreturns a list of packages with their IDs, names, and sources. The ID is what you’ll use to install. If you see multiple results, pick the one from a trusted source (usually “winget” or “msstore”). - Install a package. Run
winget install <PackageID>. For instance,winget install VideoLAN.VLC. Winget downloads the installer and runs it silently (if the installer supports it). You may see a UAC prompt – click “Yes”. - Install without confirmation. To skip the source agreement prompts, add
--accept-package-agreements --accept-source-agreements. For example:winget install --id VideoLAN.VLC --accept-package-agreements --accept-source-agreements. This is useful for scripting. - Update a single package. Use
winget upgrade <PackageID>to update that app. For example,winget upgrade VideoLAN.VLC. - Update all packages. Run
winget upgrade --all. This checks every installed winget-managed app and updates them all. You can add--include-unknownto also update packages that don’t report a version, but be careful – that can cause issues. - List installed packages. Use
winget listto see everything winget manages. You can filter with a keyword:winget list <keyword>. - Uninstall a package. Run
winget uninstall <PackageID>. For example,winget uninstall VideoLAN.VLC. This triggers the uninstaller. - Export and import your app list. To back up your setup, run
winget export -o apps.json. To restore on a new machine, copy that file and runwinget import -i apps.json. This is handy for reinstalling Windows. - Use aliases for speed. Winget supports short aliases:
winget installcan be shortened towinget add,winget upgradetowinget update, andwinget listtowinget ls. These work in recent versions.
Common Mistakes
- Using the app name instead of the ID.
winget install "VLC media player"often fails because the exact name is not the ID. Always use the ID from the search results. - Forgetting the source agreement flags. On first use, winget asks you to accept source agreements. If you’re scripting, add the flags to avoid hangs.
- Installing the wrong edition. Some apps have multiple versions (e.g., “VLC” vs “VLC (64-bit)”). Check the search output and choose the one that matches your system.
- Running without admin rights when needed. Some installers require elevation. If you get an error about permissions, close and reopen the terminal as administrator.
- Assuming all apps are in winget. Winget doesn’t cover every piece of software. If you can’t find a package, you may need to install manually.
- Using
--forceunnecessarily. The--forceflag bypasses checks and can break dependencies. Only use it when you understand the risk.
Tips
- Use
winget searchwith the source filter. Add--source wingetto limit results to the community repository, which has more software than the Microsoft Store. - Create a one-command update. Combine
winget upgrade --allwith the accept flags:winget upgrade --all --accept-package-agreements --accept-source-agreements. Run it weekly to keep everything fresh. - Check for pending updates. Use
winget upgrade(without--all) to see what’s outdated without updating. - Use the
--silentflag for quiet installs. Some installers respond to--silentor--quiet; winget passes these to the installer. This is useful for automation. - Learn the
--locationflag. To install to a custom directory, add--location "D:\Apps". Not all installers respect this, but many do. - Keep winget itself updated. The tool updates via the Microsoft Store. Check
winget --versionperiodically and update the App Installer if needed.
Troubleshooting
- “No package found matching input” – Double-check the ID. Run
winget searchagain and copy the exact ID. Also try adding--source winget. - “Failed to download source” or source errors – This often means network issues or a corrupted cache. Run
winget source reset --forceto rebuild the source list. - “Installer hash mismatch” – The file changed after publication. Run
winget install --ignore-security-hash <ID>to bypass (use with caution), or wait for the package maintainer to update. - “App is not installed” after a successful install – Some apps require a reboot or a log-out. Also check if the app installed per-user; run
winget listto confirm. - Winget not recognized – Ensure you’re on Windows 11 with the latest updates. If not, install “App Installer” from the Microsoft Store. Then restart your terminal.
- “Access denied” errors – Close the terminal and reopen as administrator. Right-click the terminal icon and select “Run as administrator”.
- Updates fail with a specific error code – Look up the code online, but first try
winget upgrade --all --forceto force the update. If that fails, uninstall and reinstall the app.
Frequently Asked Questions
- Is winget safe to use? Yes, it only installs from trusted sources (winget community repo and Microsoft Store). However, always check the publisher and source before installing.
- Can I use winget to install apps from the Microsoft Store? Yes, many Store apps are available via the
msstoresource. Search with--source msstore. - How do I update winget itself? Winget updates automatically through the Microsoft Store’s App Installer. You can also manually check by searching for “App Installer” in the Store.
- Does winget work on Windows 10? Yes, it’s available on Windows 10 1809 and later, but this guide focuses on Windows 11. The commands are the same.
- Can I use winget in a script or CI/CD? Absolutely. Use the
--accept-*flags and--silentto make it non-interactive. For example:winget install --id Git.Git --silent --accept-package-agreements --accept-source-agreements. - Why does winget sometimes install an older version? The repository may not have the latest version yet. Check
winget show <ID>to see the available version, and consider updating the package manifest or using the publisher’s site.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- How to Save Pictures from Google Docs on Phone and PC
- How to Pay with Apple Pay on iPhone, Apple Watch & Apps
- Fix Dropbox Error 0x80070780 Access Issues
- Fix iTunes Error 2 on Windows: Step-by-Step Guide
- How to Shuffle Playlists on Spotify
- Spotify Not Working on Firestick? Fixes That Work