Ollama: Clean up old Ollama files before running update (#5534)

* Update ollama.sh

* Update openwebui.sh
This commit is contained in:
Slaviša Arežina 2025-06-28 12:21:55 +02:00 committed by GitHub
parent 1e05867b4c
commit 8e7978713f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -30,6 +30,8 @@ function update_script() {
if [ -x "/usr/bin/ollama" ]; then
msg_info "Updating Ollama"
rm -rf /usr/lib/ollama
rm -rf /usr/bin/ollama
OLLAMA_VERSION=$(ollama -v | awk '{print $NF}')
RELEASE=$(curl -s https://api.github.com/repos/ollama/ollama/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}')
if [ "$OLLAMA_VERSION" != "$RELEASE" ]; then