How To Install and Use Chocolatey Package Manager For Windows? – POFTUT

How To Install and Use Chocolatey Package Manager For Windows?

Linux distributions have different package manager like apt, yum, dnf in order to install applications, programs, packages. Windows recently has a package manager named Chocolatey which can search, install, remove Windows packages from a decentralized repository. It uses NuGet infrastructure using PowerShell.

Chocolatey Features

Chocolatey provides advanced features like below.

  • Chocolatey provides unattended installation with a PowerShell.
  • Chocolatey works all existing software installation technologies like MSI, NSIS, InnoSeyup etc.
  • Chololatey can manage all aspects of software like search, install, update, remove.
  • With PowerShell, software management can be automated by supporting complex scenarios.
  • Easily build software installation packages.
  • With Packet Internalizer makes offline package installation.
  • Chocolatey integrates with configuration managers like SCCM, Puppet, Chef or PowerShell DSC.
  • Create internal organization repository for application installation.
  • Provides CLI tool named, choco.exe for command line usage.
  • Provide GUI tool named Chocolatey GUI for human-friendly usage.

Requirements

Chocolatey can be used with PowerShell and .Net Framework there is the following requirements in order to use Chocolatey.

  • Windows 7+/Windows 2003+ (Server Core also, but not Windows Nano Server)
  • Windows PowerShell v2+ (not PowerShell Core aka PowerShell 6 yet)
  • .NET Framework 4.x+

Install Chocolatey On Windows with MS-DOS Command-line

We can install Chocolatey from the MS-DOS command line. First, we will open the MS-DOS command line with Administrative privileges below. Click open Start Menu and write cmd which will list Command Prompt. Right click to the Command prompt which will open a menu which contains Run as administrator like below and click to open it.

Then there will be a User Account Control. We will click to Yes

User Account Control

User Account Control

We will use the following command which is a bit complex but do not worry it will work seamlessly.

Install Chocolatey On Windows with MS-DOS Command-line

Install Chocolatey On Windows with MS-DOS Command-line

 

LEARN MORE  Linux "Apt-Get Command Not Found" Error Solution

Install Chocolatey On Windows with PowerShell Command-line

We can install Chocolatey from the PowerShell command line. First, we will open the PowerShell command line with Administrative privileges below. Click open Start Menu and write cmd which will list Command Prompt. Right click to the Command prompt which will open a menu which contains Run as administrator like below and click to open it.

Then there will be a User Account Control. We will click to Yes

We will use the following command which is a bit complex but do not worry it will work seamlessly. Then we will enable the unsigned PowerShell scripts to run on PowerShell. We will use Set-ExecutionPolicy. There will be a prompt where we will accept with A.

Now we can run the PowerShell installation script like below.

 

Print Chocolatey Version

After installing the Chocolatey we will print the version we have installed. We will use -v option which will print only the version of choco.exe.

Print Chocolatey Version

Print Chocolatey Version

Print Chocolatey Help Information

We can print help information about the choco.exe with the -h option. This will simply print general commands and detailed usage information about the choco.exe.

Print Chocolatey Help Information

Print Chocolatey Help Information

Search Packages, Programs with Chocolatey

We will start with a searching specific package with the search command. In this example, we will search for the package named winamp.

Search Packages, Programs with Chocolatey

Search Packages, Programs with Chocolatey

We can see that related packages are listed with the following information. We can see that there are 9 results which matched with the term winamp.

  • package name is the exact name of the package like winamp.
  • version is the latest package version which is 5.666
  • package status is the state of the package whether it is approved or not.
LEARN MORE  How To Install Updates In Ubuntu, Debian, Mint, Kali

Print Information About Packages, Programs with Chocolatey

Before installation or if we are curious we can list detailed information about a package. We will use infocommand by providing the exact name of the package which is winamp in this example.

Print Information About Packages, Programs with Chocolatey

Print Information About Packages, Programs with Chocolatey

We can see that there is detailed information about the package like below.

  • Title is the official name of the package which is Winamp.
  •  Published is the date the package last time published.
  • Package Testing Status is the package test result and status whether it is working properly.
  • Number of Download is the total download number.
  • Downloads for this version is the download number for the listed version which is 3386.
  • Package URL Chocolatey Package Source is the source of the package URL location.
  • Package Checksum is SHA512 package hash
  • Tags are keywords describing the package like category
  • Software site is the site of the publishing of the software.
  • Software License
  • Summary is a very little description of the package.
  • Description is detailed information about the package.

Install Packages, Programs with Chocolatey

We can install specific a package with the install command by providing the package name.

Install Packages, Programs with Chocolatey

Install Packages, Programs with Chocolatey

We can see that Winamp installation is completed successfully after following steps.

  • License is accepted.
  • Package is downloaded
  • Accept to run installation scripts
  • Installation Result

Install Multiple Packages, Programs with Chocolatey

We can also install multiple packages or programs with a single install command by separating them with spaces. We will use install command in order to install nmap, notepadplusplus and winamp like below.

LEARN MORE  Linux "Apt-Get Command Not Found" Error Solution

Install Multiple Packages, Programs with Chocolatey

Install Multiple Packages, Programs with Chocolatey

Update Specified Packages, Programs with Chocolatey

We can update specific packages with the upgrade command. We will also specify the package named which is nmap in this case.

Update Specified Packages, Programs with Chocolatey

Update Specified Packages, Programs with Chocolatey

List Outdated/Old Packages with Chocolatey

We can also list currently installed and outdated or old packages. We will use outdatedcommand like below.

List Outdated/Old Packages with Chocolatey

List Outdated/Old Packages with Chocolatey

While listing outdated packages the following information is provided.

  • Package name
  • Current version is the currently installed an outdated version.
  • Available Version is the updated version available.
  • Pinned

Remove/Uninstall Packages, Programs with Chocolatey

We can remove or uninstall the specified package. We will use uninstall command like below. We will uninstall the package named uninstall.

Remove/Uninstall Packages, Programs with Chocolatey

Remove/Uninstall Packages, Programs with Chocolatey

Update/Upgrade Chocolatey Itself

Chocolatey is updated regularly. We can update upgrade chocolatey with the following command.

Install Chocolatey GUI onWindows

Chocolatey GUI is provided with the choco.exe we will install it with the package named chocolateygui.

Install Chocolatey GUI onWindows

Install Chocolatey GUI onWindows

Chocolatey GUI

We can open Chocolatey GUI from the Start menu like below.

Open Chocolatey GUI

Open Chocolatey GUI

As this is a package manager to install packages we required Administrative privileges

We will see the following dashboard which will provide most of the command line functions like install, update, remove.

Chocolatey GUI

Chocolatey GUI

Leave a Reply

Your email address will not be published. Required fields are marked *