[GH-ISSUE #10320] Add a command in cli to update ollama! #68833

Closed
opened 2026-05-04 15:22:53 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @Meshwa428 on GitHub (Apr 17, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10320

Out of all the development features, updating ollama using a command like ollama update would be the most necessary thing in linux because manually copy pasting the curl link every time for updating ollama is a pain in the a** .

If possible please add this.

Originally created by @Meshwa428 on GitHub (Apr 17, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10320 Out of all the development features, updating ollama using a command like `ollama update` would be the most necessary thing in linux because manually copy pasting the curl link every time for updating ollama is a pain in the a** . If possible please add this.
GiteaMirror added the feature request label 2026-05-04 15:22:53 -05:00
Author
Owner

@rick-github commented on GitHub (Apr 17, 2025):

cat > ollama-update <<EOF
#!/bin/sh
curl -fsSL https://ollama.com/install.sh | sh
EOF
chmod +x ollama-update
<!-- gh-comment-id:2812227251 --> @rick-github commented on GitHub (Apr 17, 2025): ``` cat > ollama-update <<EOF #!/bin/sh curl -fsSL https://ollama.com/install.sh | sh EOF chmod +x ollama-update ```
Author
Owner

@Meshwa428 commented on GitHub (Apr 17, 2025):

Thanks!

<!-- gh-comment-id:2812229950 --> @Meshwa428 commented on GitHub (Apr 17, 2025): Thanks!
Author
Owner

@Meshwa428 commented on GitHub (Apr 17, 2025):

ok so for folks like me you can have this:

#!/bin/sh

if ! command -v ollama >/dev/null 2>&1; then
    echo "[ollama-update] Ollama is not installed. Installing now..."
    curl -fsSL https://ollama.com/install.sh | sh
    exit 0
fi

current_version="v$(ollama -v | awk '{print $NF}')"

latest_version=$(curl -fsSL https://api.github.com/repos/ollama/ollama/releases/latest | grep -Po '"tag_name": "\K.*?(?=")')

if [ -z "$current_version" ] || [ -z "$latest_version" ]; then
    echo "[ollama-update] Failed to determine versions."
    exit 1
fi

if [ "$current_version" = "$latest_version" ]; then
    echo "[ollama-update] Ollama is up to date ($current_version)."
else
    echo "[ollama-update] Updating Ollama: $current_version$latest_version"
    curl -fsSL https://ollama.com/install.sh | sh
fi
<!-- gh-comment-id:2812277284 --> @Meshwa428 commented on GitHub (Apr 17, 2025): ok so for folks like me you can have this: ```bash #!/bin/sh if ! command -v ollama >/dev/null 2>&1; then echo "[ollama-update] Ollama is not installed. Installing now..." curl -fsSL https://ollama.com/install.sh | sh exit 0 fi current_version="v$(ollama -v | awk '{print $NF}')" latest_version=$(curl -fsSL https://api.github.com/repos/ollama/ollama/releases/latest | grep -Po '"tag_name": "\K.*?(?=")') if [ -z "$current_version" ] || [ -z "$latest_version" ]; then echo "[ollama-update] Failed to determine versions." exit 1 fi if [ "$current_version" = "$latest_version" ]; then echo "[ollama-update] Ollama is up to date ($current_version)." else echo "[ollama-update] Updating Ollama: $current_version → $latest_version" curl -fsSL https://ollama.com/install.sh | sh fi ```
Author
Owner

@stasbalazuk commented on GitHub (Jun 30, 2025):

$installerUrl = "https://github.com/ollama/ollama/releases/download/v0.9.3/OllamaSetup.exe"
$tempPath = "$env:TEMP\OllamaSetup.exe"

try {
Write-Host "🔽 Завантажуємо Ollama з GitHub..." -ForegroundColor Cyan
Invoke-WebRequest -Uri $installerUrl -OutFile $tempPath -UseBasicParsing -ErrorAction Stop
Write-Host " Файл завантажений: $tempPath" -ForegroundColor Green

Write-Host "⚙️ Запускаємо установку..." -ForegroundColor Yellow
Start-Process -FilePath $tempPath -ArgumentList "/SILENT" -Wait

Write-Host "🧹 Видаляємо установник..." -ForegroundColor Gray
Remove-Item $tempPath -Force
}
catch {
Write-Host " Помилка: $($_.Exception.Message)" -ForegroundColor Red
if (Test-Path $ tempPath) {
Write-Host "🧹 Видаляємо недокачаний файл..." -ForegroundColor DarkYellow
Remove-Item $tempPath -Force
}
}

<!-- gh-comment-id:3020296147 --> @stasbalazuk commented on GitHub (Jun 30, 2025): $installerUrl = "https://github.com/ollama/ollama/releases/download/v0.9.3/OllamaSetup.exe" $tempPath = "$env:TEMP\OllamaSetup.exe" try { Write-Host "🔽 Завантажуємо Ollama з GitHub..." -ForegroundColor Cyan Invoke-WebRequest -Uri $installerUrl -OutFile $tempPath -UseBasicParsing -ErrorAction Stop Write-Host "✅ Файл завантажений: $tempPath" -ForegroundColor Green Write-Host "⚙️ Запускаємо установку..." -ForegroundColor Yellow Start-Process -FilePath $tempPath -ArgumentList "/SILENT" -Wait Write-Host "🧹 Видаляємо установник..." -ForegroundColor Gray Remove-Item $tempPath -Force } catch { Write-Host "❌ Помилка: $($_.Exception.Message)" -ForegroundColor Red if (Test-Path $ tempPath) { Write-Host "🧹 Видаляємо недокачаний файл..." -ForegroundColor DarkYellow Remove-Item $tempPath -Force } }
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#68833