Error: couldn't find model "nosuchmodel" to stop comes from
ollama stop when the name you gave is not a model on that server. Run
ollama ps, copy the name from its NAME column exactly, and stop
that.
A model that exists but is not loaded is a different case: ollama stop printed
nothing and returned exit code 0 for it. So the error points at the name, not at whether the
model was running.
The error
PS> ollama stop nosuchmodel
Error: couldn't find model "nosuchmodel" to stop
The command returned exit code 1.
Why it happens
ollama stop takes one model name. In the test, the name
nosuchmodel matched no model on the server the client was pointed at, and the
message repeated that name in quotes. Compare the quoted name with the output of
ollama ps or ollama list character by character, tag included.
The other case is quieter. qwen2.5:0.5b was on the server but not loaded at
the time, and ollama stop qwen2.5:0.5b produced no output and exit code 0.
A script that checks the exit code therefore cannot tell "stopped" from "was not running",
and needs ollama ps before and after if that matters.
The fix
PS> ollama ps
NAME ID SIZE PROCESSOR CONTEXT RUNNER UNTIL
qwen3:0.6b 7df6b6e09427 2.4 GB 100% GPU 4096 llamacpp 4 minutes from now
PS> ollama stop qwen3:0.6b
PS> ollama ps
NAME ID SIZE PROCESSOR CONTEXT RUNNER UNTIL
ollama ps lists the loaded models with their full names, tag included. After
ollama stop qwen3:0.6b (exit code 0, no output) the list was empty, which is
the confirmation that the model left memory. If the list is empty before you start, there is
nothing to stop.
Point the client at the right server as well. With qwen3:0.6b loaded on the test server
at 127.0.0.1:15190, setting OLLAMA_HOST=127.0.0.1:15191 (a
second test server with the same models folder) made ollama ps list nothing,
and ollama stop qwen3:0.6b there printed nothing and exited 0 while the
model stayed loaded on 15190.
How it was reproduced
On Windows 11 in Windows PowerShell 5.1 with Ollama 0.40.16, against a separate test
server on 127.0.0.1:15190 with its own models folder. qwen3:0.6b was loaded
(ollama ps listed it); qwen2.5:0.5b existed but was not loaded. The client ran
ollama stop with the unloaded model, with a name that does not exist, then
ollama ps, ollama stop qwen3:0.6b and ollama ps
again.
Frequently asked
- Why does ollama stop say couldn't find model to stop?
- The name given matched no model on the server the client talked to. Copy the name from the NAME column of ollama ps and try again.
- What happens if I ollama stop a model that is not running?
- In the test with Ollama 0.40.16, stopping a model that existed but was not loaded printed nothing and returned exit code 0.
- How do I check that ollama stop worked?
- Run ollama ps afterwards. In the test the list was empty after ollama stop qwen3:0.6b.
More decoded errors in the Fixes category. For
ollama stop with two names at once, see
Ollama: 'accepts 1 arg(s),
received 2'.