#!/bin/bash source "${AGENT_PATH}/common.sh" _check_required_env_vars "CONTAINER_NAME" # LanguageTool Uninstall Script echo "Stopping container ${CONTAINER_NAME}..." _stop_container "$CONTAINER_NAME" echo "Removing container ${CONTAINER_NAME}..." _remove_container "$CONTAINER_NAME" || _die "Failed to remove container ${CONTAINER_NAME}" # CRITICAL: Never remove data volumes in uninstall.sh! # Data volumes (ngrams) must be preserved for potential reinstallation # Only destroy.sh should remove volumes echo "Uninstallation of ${CONTAINER_NAME} complete" echo "Note: Data volumes have been preserved. To remove all data, use destroy.sh"