Can't update to Bench 5.21.0 → 5.22.3

I’m running bench update but it gives me this error:

$ git pull upstream main
fatal: couldn’t find remote ref main
ERROR: git pull upstream main
subprocess.CalledProcessError: Command ‘git pull upstream main’ returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
File “/usr/local/lib/python3.10/dist-packages/bench/”, line 132, in cli
File “/usr/local/lib/python3.10/dist-packages/bench/commands/”, line 59, in update
File “/usr/local/lib/python3.10/dist-packages/bench/utils/”, line 456, in update
pull_apps(apps=apps, bench_path=bench_path, reset=reset)
File “/usr/local/lib/python3.10/dist-packages/bench/”, line 817, in pull_apps"git pull {rebase} {remote} {branch}", cwd=app_dir)
File “/usr/local/lib/python3.10/dist-packages/bench/”, line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/”, line 169, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: git pull upstream main

Any clue?


What does: pip3 install frappe-bench --upgrade return?

1 Like

Hey @smino that one worked, Thanks! I was able to update Bench to 5.22.3, any reason why bench update didn’t work?

I believe bench update updates the apps (frappe, erpnext), not frappe-bench itself. If there is an update to frappe-bench available , there is usually a message at the end of bench update. If bench update still fails, there may be other issues in play.


I see, seems like the bench update --bench command is no longer available. Update bench to newer version - Frappe Forum