Solution to Azure CLI won't upgrade to latest version or it still works after uninstall

On Windows using the Windows Installer and Azure CLI wouldn’t update to the latest version - it was stuck on 2.0.44, but the latest is 2.0.66.

I uninstalled the Azure CLI via Apps, but it was still available via Terminal, cmd, and PowerShell.

I did some sluething and found these files in C:\Python36\Scripts

  • az
  • az.bat
  • az.completion.sh

The az files to delete

Seems like the uninstaller missed those files.

I deleted all three of them and az no longer worked.

Not sure how I got into this state, but if you find yourself in the same situation, just deleted those files, re-install the CLI and you should be good.

Tracking the issue here: https://github.com/Azure/azure-cli/issues/9958

Update: 7/22/2019

It appears that I installed the Azure CLI via pip at some point and forgot I did that. I ran pip uninstall azure-cli and got the following, which cleaned up all the other files. So, if you run into the same issue, just uninstall via pip.

The pip uninstsall files

Jon