I love the use of a good CLI to improve my productivity. In the past, I used Chocolatey to manage the installation of Windows apps, but for some time now, Microsoft has offered its own package manager called Windows Package Manager, or Winget for short.
Starting with Windows 10 (version 1709+) and now integral to Windows 11, Winget is an open-source package manager designed to bring a convenient, CLI-based experience for managing your Windows applications. This blog post will guide you through the installation of Winget if it’s not already on your system, as well as cover the basics of using it.
Installing Winget
If you’re running a recent version of Windows, there’s a good chance you already have Winget installed. If not, or if you’re unsure, here’s how to get it:
- Visit the Microsoft Store or use the direct link provided: App Installer.
- Click the ‘Get’ button to install the App Installer, which includes Winget.
- Once installed, you can access Winget via the Windows Terminal, Command Prompt, or PowerShell.
Using Winget
With Winget, you can find, install, update, and remove software packages. Let’s go through some basic commands.
Search for a Package
To search for an application, use the search
command:
winget search <application name>
Install a Package
To install an application, use the install
command:
winget install <application name>
List Installed Packages
To see what packages you have installed, use the list
command:
winget list
Update a Package
To update an application to the latest version, use the upgrade
command:
winget upgrade <application name>
If you want to update all your applications at once, you can use:
winget upgrade --all
Remove a Package
To uninstall an application, use the uninstall
command:
winget uninstall <application name>
Using IDs
Using the unique ID of the application instead of its name avoids the confusion of selecting the wrong version or variant. In the previous commands, you can change the <application name>
value for the ID that you can find in the search and list commands. This approach is especially useful in automation to ensure accurate and predictable package management.
Using the previous screenshot as a reference, if I want to upgrade the Visual Studio installer I can use the following command (of course you can select and copy the IDs from your terminal window)
winget upgrade {6F320B93-EE3C-4826-85E0-ADF79F8D4C61}
Manage Previously Installed Apps
When you use the winget list
command, it shows all applications installed on your system, regardless of how they were installed. This means you can potentially manage them with Winget commands after that point. However, there might be exceptions, such as certain system apps or apps installed in non-standard ways, which may not be manageable through Winget.
Keep in mind that while Winget is versatile, the ability to manage non-Winget-installed apps could vary depending on the specific application and how it registers itself in the system.
Curated Lists of Packages
Curated lists are a great way to discover and manage apps with Winget. Websites like winstall.app provide a streamlined interface for batch-installing applications, making it easy to pick and choose a variety of tools and generate a single Winget command for installation.
My Top Winget Packages List (some are paid or need a subscription)
- Readdle.Spark: A streamlined email client that enhances my email management.
- Bitwarden.Bitwarden: A secure password manager for safekeeping and easy access to passwords.
- Notion.Notion: An organizational tool for notes and task management.
- Docker.DockerDesktop: An indispensable tool for running containerized applications.
- Fork.Fork: A user-friendly Git client for version control.
- Microsoft.Teams: The hub for team collaboration and communication.
- Mozilla.Firefox: My preferred web browser for secure and efficient browsing.
- Microsoft.OneDrive: Cloud storage for easy file syncing across devices.
- Postman.Postman: A powerful tool for API testing and development workflows.
- 2BrightSparks.SyncBackPro: A reliable solution for data backup and synchronization.
- TIDALMusicAS.TIDAL: A high-quality music streaming service for audiophiles.
- VideoLAN.VLC: A versatile media player supporting various file formats.
- SlackTechnologies.Slack: Essential for staying connected with my team’s communications.
- Microsoft.VisualStudioCode: A feature-rich code editor for software development.
- Microsoft.SQLServerManagementStudio: A comprehensive tool for managing databases.
Exporting and Importing Packages
A great feature of Winget is the ability to export and import a list of packages. This can be extremely useful when setting up a new machine or ensuring you have a consistent environment across multiple systems.
Export Your Packages
winget export -o <file path>
Import Packages
winget import -i <file path>
Interesting Information About Winget
- Windows Package Manager CLI (winget) itself is open source, and its code is available on GitHub. This transparency allows developers to understand how Winget works and even contribute to its development.
- Winget works by using manifest files that describe how to install a particular application, meaning you can create custom manifests for in-house software or rare tools not found in the public repository.
- Microsoft is actively developing Winget, and it often receives updates that add new features, improve security, and enhance performance.
- Since Winget is a command-line interface tool, it can be integrated into scripts or used as part of larger automated processes to streamline the deployment of software.
Conclusion
By incorporating Winget into your workflow, you can save time and ensure that the software on your Windows machine is easily manageable, consistent, and up-to-date. Whether you’re a system administrator, a developer, or just a power user, Winget provides a robust toolset that can help simplify your software management tasks.