[GH-ISSUE #4274] Update command for Linux version #28427

Open
opened 2026-04-22 06:36:38 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @Maplerxyz on GitHub (May 9, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4274

Would be cool to see an update command to the Linux CLI like the update button on Mac. Would be way easier to run`ollama --update`` instead of having to run the entire installation command again manually.

Originally created by @Maplerxyz on GitHub (May 9, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4274 Would be cool to see an update command to the Linux CLI like the update button on Mac. Would be way easier to run`ollama --update`` instead of having to run the entire installation command again manually.
GiteaMirror added the installlinuxfeature request labels 2026-04-22 06:36:38 -05:00
Author
Owner

@sterenas commented on GitHub (May 10, 2024):

Same for Windows. A simple way of updating all models using pull - - update all ?

<!-- gh-comment-id:2103645289 --> @sterenas commented on GitHub (May 10, 2024): Same for Windows. A simple way of updating all models using pull - - update all ?
Author
Owner

@sukipop commented on GitHub (May 16, 2024):

yes please! -U, --update would be very helpful, i've been using alias update-ollama='curl -fsSL https://ollama.com/install.sh | sh'

<!-- gh-comment-id:2116386227 --> @sukipop commented on GitHub (May 16, 2024): yes please! `-U, --update` would be very helpful, i've been using `alias update-ollama='curl -fsSL https://ollama.com/install.sh | sh'`
Author
Owner

@lyfuci commented on GitHub (Apr 17, 2026):

Hi — wanted to propose a narrower version of this that might be easier
to land than a full ollama update command.

Problem I actually hit on Linux: I don't want to memorize / re-type
curl -fsSL https://ollama.com/install.sh | sh every time I notice
Ollama is behind. I'd also rather not have a CLI silently replace my
binary (permissions, systemd service, package-manager conflicts — all
the reasons I assume a self-updater hasn't already shipped).

What would actually solve it for me: a read-only ollama update --check subcommand that:

  • hits the existing https://ollama.com/api/update endpoint (the same
    one the macOS/Windows tray app already uses in app/updater/updater.go)
  • prints current: vX.Y.Z / latest: vA.B.C
  • prints the exact command I should run, chosen from my install
    source (Homebrew / apt / dnf / snap / install.sh / the macOS tray app)
  • does not touch the binary, does not prompt for sudo, does
    not restart the service

This is ~a few dozen lines: lift checkForUpdate out from behind the
//go:build windows || darwin tag into a small shared package, add one
cobra command in cmd/cmd.go, and a tiny install-source detector.

It sidesteps all the hard parts (cross-platform binary replacement,
permission escalation, package-manager divergence, Windows exe file
locking) while giving Linux users a useful "am I out of date, and what
should I run?" affordance — which I suspect is what most of the folks
commenting on this issue and its duplicates actually want.

Happy to open a PR along these lines if a maintainer thinks the scope
makes sense. Wanted to check interest before writing code, given the
issue has been open for a while without an accepted direction.

<!-- gh-comment-id:4269277394 --> @lyfuci commented on GitHub (Apr 17, 2026): Hi — wanted to propose a narrower version of this that might be easier to land than a full `ollama update` command. **Problem I actually hit on Linux:** I don't want to memorize / re-type `curl -fsSL https://ollama.com/install.sh | sh` every time I notice Ollama is behind. I'd also rather not have a CLI silently replace my binary (permissions, systemd service, package-manager conflicts — all the reasons I assume a self-updater hasn't already shipped). **What would actually solve it for me:** a read-only `ollama update --check` subcommand that: - hits the existing `https://ollama.com/api/update` endpoint (the same one the macOS/Windows tray app already uses in `app/updater/updater.go`) - prints `current: vX.Y.Z / latest: vA.B.C` - prints the **exact command** I should run, chosen from my install source (Homebrew / apt / dnf / snap / install.sh / the macOS tray app) - does **not** touch the binary, does **not** prompt for sudo, does **not** restart the service This is ~a few dozen lines: lift `checkForUpdate` out from behind the `//go:build windows || darwin` tag into a small shared package, add one cobra command in `cmd/cmd.go`, and a tiny install-source detector. It sidesteps all the hard parts (cross-platform binary replacement, permission escalation, package-manager divergence, Windows exe file locking) while giving Linux users a useful "am I out of date, and what should I run?" affordance — which I suspect is what most of the folks commenting on this issue and its duplicates actually want. Happy to open a PR along these lines if a maintainer thinks the scope makes sense. Wanted to check interest before writing code, given the issue has been open for a while without an accepted direction.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#28427