Created
July 30, 2025 12:09
-
-
Save frosit/945c6d0d9f1298f26e83743845c38d9d to your computer and use it in GitHub Desktop.
Ollama update all models (windows / powershell)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env pwsh | |
# Updates ollama models. | |
# | |
# Takes output from `ollama list` and updates each model. | |
# Example: | |
# NAME ID SIZE MODIFIED | |
# snowflake-arctic-embed:latest 21ab8b9b0545 669 MB 4 weeks ago | |
# nomic-embed-text:latest 0a109f422b47 274 MB 4 weeks ago | |
# qwen3:latest 500a1f067a9f 5.2 GB 4 weeks ago | |
# | |
# Usage: | |
# .\ollama-update.ps1 | |
# | |
$models = ollama list | Where-Object { $_ -notmatch '^NAME' -and $_.Trim() -ne '' } | ForEach-Object { | |
($_ -split '\s+')[0] # Extract model name (first column) | |
} | |
foreach ($model in $models) { | |
Write-Output "Updating model: $model" | |
ollama pull $model | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment