Unlock the Power of Winget: Master Windows Package Management
Welcome to our deep dive into Winget, the command-line package manager for Windows. Whether you're setting up a new machine, managing software updates, or simply curious about streamlining your digital environment, this video is for you!
RESOURCES
- Watch on YouTube
- YouTube Playlist
- Download Winget
- Winget Documentation
- Winget.run for app search and commands
What is Winget?
Winget is a command-line tool for managing applications on Windows. Think of it as the Windows equivalent of Linux’s APT or macOS’s Homebrew. You can:
- Install apps in seconds.
- Search for apps without opening a browser.
- Update, remove, and manage apps with a few commands.
- Share your setup with others using JSON files.
Installing Winget
Pre-installed on Windows 11
- Open the Microsoft Store.
- Go to the Library section.
- Click Get updates to ensure “App Installer” (which includes Winget) is up to date.
Installing on Windows 10
- From Microsoft Store: Search for App Installer and install it.
- Direct Download: Visit aka.ms/getwinget and download the latest App Installer package.
Winget Basics
Searching for Applications
1
winget search <app-name>
Example:
1
winget search firefox
It will list all related apps. To narrow it down, use the ID provided in the results.
Installing Applications
1
2
3
4
5
# Install with App Name
winget install <app-name>
# If multiple results show up, specify the app ID:
winget install <app-id>
Example:
1
winget install Mozilla.Firefox
Listing Installed Applications
1
winget list
Updating Applications
1
2
3
4
5
# Update a specific app:
winget upgrade <app-name>
# Update all apps at once:
winget upgrade --all
Uninstalling Applications
Remove an app by name or ID:
1
winget uninstall <app-name>
⚠️ Be careful with dependencies: Removing shared libraries or tools might break other apps.
Advanced Features
Backup and Restore
Save your app setup and replicate it on another machine:
-
Export a list of installed apps:
1
winget export --output apps.json
-
Import the list on another machine:
1
winget import --input apps.json
Note: This restores apps with their default configuration. Customizations aren’t included.
Custom Sources
Add custom app repositories to expand your app library:
1
winget source add --name <source-name> <source-url>
List current sources:
1
winget source list
Running Scripts with Winget
1
winget install vscode && winget install git
Tips and Tricks
-
Use
--silent
: Skip prompts during installation.1
winget install <app-name> --silent
Avoid Uninstalling Critical Dependencies: Double-check dependencies before removing apps.
Winget.run: Use Winget.run to search apps and copy installation commands directly from your browser.
-
Shortcut Commands:
- View help:
winget --help
- View version:
winget --version
- View help:
- Script Your Setup: Watch a video on automating your Windows 11 setup - Windows 11 Setup and WSL
Troubleshooting
- App Not Found: Ensure Winget is up to date by running updates in the Microsoft Store.
-
Errors During Installation: Check app IDs or use
--force
for stubborn cases. - Permissions Issues: Run the terminal as Administrator.
With Winget, managing apps is faster, simpler, and more efficient. Whether you’re setting up a new machine or maintaining your current one, Winget is your go-to tool. Try it out and make your Windows experience smoother!