How to check the Ollama version

The Ollama version can be checked through the CLI and through the local API. Comparing both surfaces helps confirm that a shell command and a running server belong to the same install.

Use the CLI check after installs and updates, and the API check when debugging application connectivity. A stale background server can answer API requests even after a different CLI binary is installed earlier on PATH.

Record exact versions in task evidence when behavior depends on a recent feature, but keep article steps focused on the check itself.

Steps to check the Ollama version:

  1. Check the CLI version.
    $ ollama --version
    ollama version is 0.31.1
  2. Check which binary the shell is using.
    $ command -v ollama
    /opt/homebrew/bin/ollama
  3. Check the running API server version.
    $ curl -s http://localhost:11434/api/version
    {"version":"0.31.1"}
  4. Restart the service or app if the CLI and API versions differ after an update.
    $ sudo systemctl restart ollama
  5. Check the version again after restart.
    $ curl -s http://localhost:11434/api/version
    {"version":"0.31.1"}