Package Management - alarwasyi98/dotfiles-win GitHub Wiki
WinGet
A package manager command-line tool powered officially by Windows that enabling users to discover, install, upgrade, remove and configure applications on Windows Machine. This tool was installed by default on Windows 10 and Windows 11. However, you can run this PowerShell command to request WinGet registration:
Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
Run winget --help
and verify that Winget is running properly.
winget --help
Chocolatey
Chocolatey (choco
) is popular package repostory around Windows community. It gives us speed and simplicity of building a package. Not stop there, chocolatey offers deployment tool and package building on their repository.
It can be installed by running the following oneliner command. It will installing chocolatey community version because of chocolatey is basicly paid service.
# copy and paste the following command
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# verify installation by running:
choco -?
Scoop
Scoop is a Command-Line Installer for Windows that focused on developer tools building packages like Zed, Node, Go. Its uses GitHub repository as bucket
of the apps.
Before installing scoop
, make sure you set the ExecutionPolicy
to RemoteSigned
by running this command:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
After that, we can install scoop seamlessly with this simple command:
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
Verify scoop installation by adding some basic bucket
scoop bucket add main
scoop bucket add extras
Windows Utility
This utility is provided by Chris Titus Tech. Windows Utility is a go-to utility for optimizing and managing your Windows environment. Whether you’re an IT professional, power user, or regular user, WinUtil provides a comprehensive set of tools to enhance your Windows experience.
To install it, simply run this command on PowerShell terminal as Administrator.
Invoke-RestMethod https://christitus.com/win | Invoke-Expression
A handy way to check all the required program is by importing a JSON
file that contains all requiered packages in this setup. refer to: winutil.json
Which Package Manager Should I Use?
There are quite a few options, so if you need to make a quick choice, take a glance at the below.
Name | Platforms | Pros | Cons |
---|---|---|---|
Winget | Windows | - Comes with Windows- Easy, straightforward package installation- Fairly detailed information about packages via winget.run | - Heavy use of console to install packages- winget.run isn’t first-party (community-supported)- Installs packages globally |
Chocolatey | Windows | - Easy to install- Very detailed package page, with comments by community users- Package search is first-party to Chocolatey itself | - Not included with Windows- Installs packages globally- Will make you crave chocolate every time you install a package 🍫 |
Scoop | Windows | - Easy to install- Package search is first-party to Scoop itself- Package installation does not occur globally — packages are installed to the scoop directory |
- Not included with Windows- Package details on the page are minimal — have to read installation scripts on GitHub to understand what they are doing |
WinUtil | Windows | - Portable and Modular. Just run a single command, there you go- Has some tweaks and another built-in utilities | - Removing or modifying critical system can lead to instability- It's isn't and app. Its kinda like a CLI Tools or automation tools hat runs on PowerShell |
Recommended Approaches
- Use Winutil for system tweaking, debloating, and initial setup
- Use Scoop for development tools and portable applications
- Use Winget for mainstream applications and Microsoft Store apps
- Keep Chocolatey as backup for packages not available in other managers
This multi-manager approach gives you the best of all worlds while maintaining the system optimization benefits of Winutil.
No matter what package management solution you use, one thing we can be sure of is that package managers save us from a lot of button-clicking on installers. They also make it a lot easier to configure a build machine or build environment to build a specific app.
Whichever package manager you choose, you’ll no doubt save some time, so enjoy!