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'.