I had mw v0.5.0 as /usr/bin/mw and tried to update by executing mw update but failed.
$ mw version -v 2 mw version 0.5.0 ( 2021-10-17T22:25:22Z ) https://gitlab.wikimedia.org/releng/cli/-/releases GitCommit: e47f25b GitBranch: HEAD GitState: dirty GitSummary: v0.5.0-dirty BuildDate: 2021-10-17T22:25:22Z Version: 0.5.0 $ mw update -v 2 New update found: 0.6.0 ? Do you want to update? Yes 12:49:40 Uncompression is not needed https://gitlab.wikimedia.org/api/v4/projects/16/packages/generic/mwcli/v0.6.0/mw_v0.6.0_linux_amd64 12:49:40 Will update /usr/bin/mw to the latest downloaded from https://gitlab.wikimedia.org/api/v4/projects/16/packages/generic/mwcli/v0.6.0/mw_v0.6.0_linux_amd64 Binary update failedopen /usr/bin/.mw.new: permission denied
while sudo mw update has succeeded.