Install a Specific Version of Software Package using Chocolatey via CMD
Chocolatey is a packet manager for Windows that helps to install, update and manage software packages from the Command Line Interface (CLI). It provides a simple way to manage software on Windows, making it a helpful and useful tool for everyone.
For installation of a specific version of a software package using Chocolatey on the Command Prompt you can use the “–version” flag followed by the desired version number.
Step 1: Opening the Command Prompt on Windows
Click on the Search Menu on the Windows taskbar.
Step 2: CMD in the search bar
Type “cmd” in the search bar, the Command Prompt (CMD) will be displayed on the Search Menu.
Step 3: Open Command Prompt as administrator
Click on the run as administrator tab and open the Command Prompt (CMD) along with administrative power.
Step 4: Installation
Run the following code in the Command Prompt to install the package:
choco install <package-name> --version <version-number>
You have to replace “<package-name> with the name of the software package you want to install and replace “<version-number>” with the desired version you want to install and use.
Example:
For installing Node.js version 14.17.0 , we will run the following command:
choco install nodejs --version 14.17.0
Here “<package-name>” is replaced by “node.js” and “<version-number>” is replaced by “14.17.0”.
Important note:
Not all versions of the software package might be available through chocolatey for use. To check the available versions you can run the following code:
choco search <package-name> --exact --verbose
You have to replace “<package-name>” according to the software package you want to install and use.
This will give all the available software packages versions available through chocolatey. (Nodejs versions from the example case)
Install a Specific Version of Software Package using Chocolatey via CMD – FAQs
How to install chocolatey on Windows?
Chocolatey can be installed by running this command in the Command Prompt `@”%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe” -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command “iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1’))” && SET “PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin”` or Install chocolatey on Windows Computer.
How to uninstall a software package using Chocolatey?
Uninstallation of software package can be done by running this command in the Command Prompt `choco uninstall package_name` replacing “package_name” with the name of the package.
How to check specific version of a software package installed using Chocolatey?
You can check specific version of a software package installed by running this command in the Command Prompt `choco list –local-only package_name` where “package_name” will be replaced by the name of the package.
How to check available online versions of a software package that can be installed using Chocolatey?
You can do this by running `choco search package_name –exact` in the Command Prompt, where “package_name” will be replaced by the name of the package you want to check.
Contact Us