0
votes

I have installed terraform using snap on Ubuntu. (sudo snap install terraform). But found that it was an older version. So I installed terraform using the following commands- wget https://releases.hashicorp.com/terraform/0.12.18/terraform_0.12.18_linux_amd64.zip and unzip terraform_0.12.18_linux_amd64.zip and sudo mv terraform /usr/local/bin/

But when I check the terraform -v, it still shows the older version installed by snapd.

I tried removing the snap package, snapd itself. But still terraform -v command gives error as '-bash: /snap/bin/terraform: No such file or directory'.

1
Open a new terminal.ydaetskcoR

1 Answers

0
votes

Usually (almost anytime, I think) the really full snap package deinstallation should include the

rm -rf ~/snap/<package> (rm -rf ~/snap/terraform)

command as finish step.

Also check your PATH environment variable (echo $PATH should contain /usr/local/bin/) and adjust it if necessary, for example like described here https://askubuntu.com/questions/3744/how-do-i-modify-my-path-so-that-the-changes-are-available-in-every-terminal-sess