Upgrading terraform v1.0.11 to v1.1.5 Issues

I’m trying to certify in terraform and one of the modules i’m doing requires me to use terraform v1.1.xx but on my windows 10 terminal (cmd) i have v1.0.11 - I downloaded and tried to install v1.1.5 but when i checked the terraform version on my machine it’s displaying the same version that i have currently v1.0.11.
**Any help how to either remove my current version v1.0.11 and install v1.1.5 or upgrade my current version to the latest v1.1.5?
Thanks for your help in advance.

Hi @phonse002,

It sounds like you originally installed the older version of Terraform in a different directory on your system, and so it’s still present even though you’ve now installed the new version.

When Windows searches for the executable file for a command you’ve entered, it refers to an environment variable called PATH which contains semicolon-separated directories to search. You can view that value by asking the command interpreter to display it:

echo %PATH%

Examine each of the listed directories to see if it contains a terraform.exe file. It sounds like your goal is to use only Terraform v1.0.11, in which case you should delete or rename any other terraform.exe files you find, so that when Windows searches these directories it will only find the terraform.exe you most recently installed for v1.0.11, and not find any of the others.

(If you do wish to use multiple Terraform versions at the same time then you can rename them to include version numbers. For example, rename terraform.exe to terraform1-1.exe and then you’d run it as terraform1-1 version instead of terraform version, but you can then have multiple versions installed together and choose which to run by which suffix you include on the command.)

Hi apparentlymart thanks for your response much appreciated - i know where the terraform.exe files are installed on my machine
*terrafom.exe for v1.0.11 is located on c:\terraform folder which i created when i first installed terraform on my machine a few months ago
*terraform.exe that i installed today using chocolatey is on C:\ProgramData\chocolatey\lib\terraform\tools
i deleted the v1.0.11 and added the v1.1.5 PATH to the variables PATH but still cannot detect the new version v1.1.5 when i use terraform version/terraform -version it only show that i have terraform v1.0.11.
my question is if i want have multiple versions like you suggest above and re-name the new v1.1.5 to terraform1-1.exe and leave the old version v1.0.11 as terraform.exe can i set the new version as default version?
Thanks for your help

@apparentlymart thanks for your help i managed to fix it by doing your suggestion above. I moved the new version to the same folder as the old one c:\Terraform and renamed the old one to terraform1-1.exe and now if i search the version it comes up as v1.1.5 which is what i need.