Stopping a running Ollama model unloads it from memory without deleting the downloaded model. It is useful after a large model test, before changing memory-related settings, or when another workload needs GPU or system RAM.

Use ollama ps to identify loaded models and ollama stop to unload the target name. The installed model remains visible in ollama list after it leaves the process list.

If the model reloads immediately, another client may still be sending requests. Stop the client or reduce keep-alive behavior before assuming ollama stop failed.

Steps to stop a running Ollama model:

  1. List currently loaded models.
    $ ollama ps
    NAME           ID              SIZE     PROCESSOR    CONTEXT    UNTIL
    gpt-oss:20b    17052f91a42e    12 GB    100% GPU     131072     4 minutes from now
  2. Stop the target model by name.
    $ ollama stop gpt-oss:20b
  3. Confirm the model is no longer loaded.
    $ ollama ps
    NAME    ID    SIZE    PROCESSOR    CONTEXT    UNTIL
  4. Confirm the model is still installed.
    $ ollama list
    NAME           ID              SIZE
    gpt-oss:20b    17052f91a42e    13 GB
  5. Use keep_alive zero for request-level immediate unloads.
    $ curl -s http://localhost:11434/api/generate -d '{"model":"gpt-oss:20b","prompt":"OK","stream":false,"keep_alive":0}'
    {"done":true}