[PR #14227] [CLOSED] cmd: add 'ollama update' command to update ollama in-place #76875

Closed
opened 2026-05-05 09:34:55 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14227
Author: @RajeshKumar11
Created: 2/13/2026
Status: Closed

Base: mainHead: feat/ollama-update-command


📝 Commits (1)

  • 44b0d04 cmd: add 'ollama update' command to update ollama in-place

📊 Changes

2 files changed (+243 additions, -0 deletions)

View changed files

📝 cmd/cmd.go (+100 -0)
cmd/update_test.go (+143 -0)

📄 Description

Closes #14152

What this does

Adds an ollama update command so users can update Ollama without manually downloading an installer from the website.

Platform behavior

  • Linux: re-invokes the official install.sh script (handles sudo, systemd, NVIDIA, ARM, WSL2, etc.)
  • macOS / Windows: informs the user that the desktop app auto-updates, and provides the manual install command as a fallback

Flags

  • --check: report whether a newer version is available without installing anything

Example output

Up to date:

$ ollama update
ollama is already up to date (version 0.6.1)

Update available (check only):

$ ollama update --check
A new version of ollama is available: 0.6.2 (current: 0.6.1)
Download: https://github.com/ollama/ollama/releases/download/v0.6.2/ollama-linux-amd64.tgz

Linux install:

$ ollama update
Updating ollama to version 0.6.2...
Running: curl -fsSL https://ollama.com/install.sh | sh

Testing

  • 5 unit tests added in cmd/update_test.go using a mock HTTP server
  • Covers: up-to-date response (204), --check output, version extraction from URL, server error handling, query param correctness
  • All existing cmd package tests continue to pass

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/14227 **Author:** [@RajeshKumar11](https://github.com/RajeshKumar11) **Created:** 2/13/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/ollama-update-command` --- ### 📝 Commits (1) - [`44b0d04`](https://github.com/ollama/ollama/commit/44b0d04ee2e7e22feb80bbc5b4d6780835467d7c) cmd: add 'ollama update' command to update ollama in-place ### 📊 Changes **2 files changed** (+243 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+100 -0) ➕ `cmd/update_test.go` (+143 -0) </details> ### 📄 Description Closes #14152 ## What this does Adds an `ollama update` command so users can update Ollama without manually downloading an installer from the website. ### Platform behavior - **Linux**: re-invokes the official `install.sh` script (handles sudo, systemd, NVIDIA, ARM, WSL2, etc.) - **macOS / Windows**: informs the user that the desktop app auto-updates, and provides the manual install command as a fallback ### Flags - `--check`: report whether a newer version is available without installing anything ## Example output **Up to date:** ``` $ ollama update ollama is already up to date (version 0.6.1) ``` **Update available (check only):** ``` $ ollama update --check A new version of ollama is available: 0.6.2 (current: 0.6.1) Download: https://github.com/ollama/ollama/releases/download/v0.6.2/ollama-linux-amd64.tgz ``` **Linux install:** ``` $ ollama update Updating ollama to version 0.6.2... Running: curl -fsSL https://ollama.com/install.sh | sh ``` ## Testing - 5 unit tests added in `cmd/update_test.go` using a mock HTTP server - Covers: up-to-date response (204), `--check` output, version extraction from URL, server error handling, query param correctness - All existing `cmd` package tests continue to pass --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-05 09:34:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#76875