#!/bin/bash

# omarchy:summary=Remove Ollama along with every model it pulled.
# omarchy:requires-sudo=true

set -e

# The service is what holds the models open, so it goes before the package.
sudo systemctl disable --now ollama.service 2>/dev/null || true

# Whichever acceleration variant is installed provides the same command.
omarchy-pkg-drop ollama ollama-cuda ollama-rocm ollama-vulkan

sudo rm -rf /var/lib/ollama
rm -rf "$HOME/.ollama"

echo ""
echo "Ollama and its models have been removed."
