Open In App

How to Install a Specific Version of Software Package using Chocolatey via CMD?

Last Updated : 25 Sep, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

To guarantee compatibility with your projects or system configuration, you may need to use Chocolatey to install a specific version of the software while managing the installation. Software packages can be effectively managed from the command line with Chocolatey, a potent package management tool. To provide you exact control over the versions you require, we'll walk you through the process of installing a particular software package using Chocolatey via CMD in this tutorial.

Install a Specific Version of Software Package using Chocolatey via CMD

Step 1: Opening the Command Prompt on Windows

Click on the Search Menu on the Windows taskbar then search cmd or command prompt.

Type "cmd" in the search and r, and the Command Prompt (CMD) will be displayed on the Search Menu.

Screenshot-2024-06-04-101403-(1)

Step 3: Open Command Prompt as administrator

Click on the run as administrator tab and open the Command Prompt (CMD) along with administrative power.

Screenshot-2024-06-04-101451

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.170, 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".

Screenshot-2024-06-04-175411

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.

Screenshot-2024-06-04-175948

This will give all the available software versions available through Chocolatey. (Nodejs versions from the example case)

Conclusion

Software installs across various contexts can be managed with flexibility when using Chocolatey to install a particular version of a package. You can make sure that the right tools are always installed on your machine by learning how to specify versions with the Chocolatey command line. Chocolatey streamlines and expedites the process of installing certain versions via CMD, whether you need an older version or want to use a different one.


Next Article
Article Tags :

Similar Reads