flyctl version update failed

I tried to update flyctl with flyctl version update, and I got this error:

Error rename C:\Users\myusername\.fly\bin\flyctl.exe C:\Users\myusername\.fly\bin\flyctl.exe.old: Access is denied.

When I tried again, I was unable to use flyctl, so I checked the .fly/bin folder, and the flyctl.exe file did not exist. It was inside flyctl.zip though.

How can I solve this?

Searched around and found that this happens because Windows won’t rename a running process.

It was solved by:

  1. End flyctl processes in Task Manager
  2. Unzip files in flyctl.zip to bin folder
  3. Run update command

Not sure if this is the right way, but it worked for me.