#!/bin/bash echo "Killing all tmux sessions starting with 'ollama'..." # Get all tmux sessions starting with "ollama" SESSIONS=$(tmux list-sessions -F '#S' | grep '^ollama') if [ -z "$SESSIONS" ]; then echo "No 'ollama' sessions found." else for SESSION in $SESSIONS; do echo "Killing session: $SESSION" tmux kill-session -t "$SESSION" done echo "All 'ollama' sessions have been terminated." fi