Error: unknown command "update" for "ollama" means the Ollama command line has
no subcommand with that name. On Ollama 0.40.16, update, restart
and uninstall all gave this message. Run ollama --help to see the
commands your version has; the list is below.
There is nothing to fix in the command line itself: the word is simply not one of its
commands. Pick one from the help list, or do the job outside the ollama
command.
The error
PS> ollama update
Error: unknown command "update" for "ollama"
PS> ollama restart
Error: unknown command "restart" for "ollama"
PS> ollama uninstall
Error: unknown command "uninstall" for "ollama"
Why it happens
update, restart and uninstall are not in the
command list that ollama --help prints on this version, and each one stopped
with this message and exit code 1. The word in the quotes is the one it did not know,
so the message tells you exactly which part to change.
ollama start is different, and it is worth knowing before you try it. It was
not refused as unknown: it tried to start a server on the address in
OLLAMA_HOST, and because the test server already held that port it stopped with
Error: listen tcp 127.0.0.1:15190: bind: Only one usage of each socket address
(protocol/network address/port) is normally permitted. It does not appear in the help
list below; the listed command for starting a server is serve.
The fix
PS> ollama --help
Large language model runner
Usage:
ollama [flags]
ollama [command]
Available Commands:
serve Start Ollama
create Create a model
show Show information for a model
run Run a model
stop Stop a running model
pull Pull a model from a registry
push Push a model to a registry
signin Sign in to ollama.com
signout Sign out from ollama.com
list List models
ps List running models
cp Copy a model
rm Remove a model
launch Launch the Ollama menu or an integration
help Help about any command
...
That is the whole list on 0.40.16. Nothing in it updates, restarts or uninstalls Ollama
itself; going by the help text, stop is for a running model and
rm removes a model. Run ollama <command> --help for the options
of one command. This is the list 0.40.16 printed; read your own with
ollama --help before you rely on a command from a guide.
How it was reproduced
On Windows 11 in Windows PowerShell 5.1 with Ollama 0.40.16. The client was pointed at a
separate test server with OLLAMA_HOST=127.0.0.1:15190; update,
restart, start and uninstall were each run once and
their output and exit code saved, then ollama --help. Nothing was updated,
restarted or uninstalled.
Frequently asked
- Is there an ollama update command?
- Not on Ollama 0.40.16. ollama update prints Error: unknown command "update" for "ollama", and the help list has no command that updates the program.
- What commands does the ollama CLI have?
- On 0.40.16: serve, create, show, run, stop, pull, push, signin, signout, list, ps, cp, rm, launch and help. Run ollama --help to see the list for your version.
- What does ollama start do?
- In the test it was not refused as unknown. It tried to start a server on the OLLAMA_HOST address and failed because that port was already in use. The listed command for starting a server is serve.
More decoded errors in the Fixes category. For a known command given the wrong number of names, see Ollama: 'accepts 1 arg(s), received 2'.