DEV Community

Cover image for Package Manager for Windows
Md. Fahim Bin Amin
Md. Fahim Bin Amin

Posted on

Package Manager for Windows

What is a package manager?

A package manager is a collection of software tools which automates the process of installation, along with the upgrading and configuring process as well. Package manager is a common feature in Linux based operating system. Some common package manager for Unix/Linux based operating systems are: Dpkg, Yum, etc. However, in Windows, package manager was not that much common at all earlier, but Chocolatey has filled the gap afterward.

What is Chocolatey?

Chocolatey is basically a software management solution for the Windows operating system. Chocolatey implements the full package management techniques. It also allows us to version different items, manage their dependencies along with the installation order, It helps to improve the inventory management as well.
You can install mostly used necessary software on your Windows operating system directly using the Chocolatey package manager.

Pre-requisite for Chocolatey

Make sure that you have the following prerequisite:

  • Windows 7+ / Windows Server 2003+
  • PowerShell v2+ (minimum is v3 for install from this website due to TLS 1.2 requirement)
  • .NET Framework 4+ (the installation will attempt to install .NET 4.0 if you do not have it installed)(minimum is 4.5 for install from this website due to TLS 1.2 requirement)

Install Chocolatey

  • Open the PowerShell with the Administrator access by clicking on the Run as Administrator.
  • Enter the command and press on the Enter key.
Get-ExecutionPolicy
Enter fullscreen mode Exit fullscreen mode
  • If it returns Restricted, then run the following command.
Set-ExecutionPolicy AllSigned
Enter fullscreen mode Exit fullscreen mode

In the prompt, press A for All.

  • Run the following command afterward.
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Enter fullscreen mode Exit fullscreen mode
  • Wait for some time and let the process finishes. After finishing, you can check out the version of the Chocolatey by using the following command.
choco --version
Enter fullscreen mode Exit fullscreen mode
  • You are good to go with the Chocolatey package manager.

Some Necessary Software You Can Install first Using Chocolatey

You can check for the software/packages you want to install from here. I prefer installing these as early as possible.

  • DirectX
choco install -y directx
Enter fullscreen mode Exit fullscreen mode
  • Microsoft Visual C++ Runtime - all versions 1.0.1
choco install -y vcreditst-all
Enter fullscreen mode Exit fullscreen mode
  • Adobe Acrobat Reader DC 2021.007.20099
choco install -y adobereader
Enter fullscreen mode Exit fullscreen mode
  • Google Chrome Web-browser
choco install -y googlechrome
Enter fullscreen mode Exit fullscreen mode
  • 7Zip
choco install -y 7zip.install
Enter fullscreen mode Exit fullscreen mode
  • Python 3.x 3.10.0
choco install -y python3
Enter fullscreen mode Exit fullscreen mode
  • Git
choco install -y git.install
Enter fullscreen mode Exit fullscreen mode
  • Node JS
choco install -y nodejs.install
Enter fullscreen mode Exit fullscreen mode
  • VS Code
choco install -y vscode
Enter fullscreen mode Exit fullscreen mode
  • Mozilla Thunderbird
choco install -y thunderbird
Enter fullscreen mode Exit fullscreen mode

If you want to check the installed package list, then you can also do so by using the following command.

choco list --local-only
Enter fullscreen mode Exit fullscreen mode

Installed Package List

Thanks for reading the entire article. You may follow me on GitHub, LinkedIn, Twitter, YouTube.

Top comments (2)

Collapse
 
billturner profile image
Bill Turner

Have you tried Winget at all yet? I'm curious how it works compared to chocolatey (which is all I've used so far).

Here's a link with info: docs.microsoft.com/en-us/windows/p...

Collapse
 
fahimfba profile image
Md. Fahim Bin Amin

Thanks for pointing that out. The answer is, Yes! I have used winget, but I didn't use that frequently as I feel comfortable in Chocolatey. Your comment has reminded me again about winget, and I think that I should definitely use that for sometime at least so that I can also get the pros and cons of both the package manager.