Set-StrictMode -Version Latest $ErrorActionPreference = 'Stop' # Load shared utilities $utilsPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Definition) '..\lib\utils.ps1' . $utilsPath .\scripts\Windows\starter.ps1 if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } # Stop the elasticsearch container Write-Step "Stopping Elasticsearch container..." docker compose stop elasticsearch if ($LASTEXITCODE -ne 0) { Write-Warning-Custom "Elasticsearch container may not be running" } Write-Success "Elasticsearch container stopped!" # Remove the elasticsearch container Write-Step "Removing Elasticsearch container..." docker compose rm -f elasticsearch if ($LASTEXITCODE -ne 0) { Write-Warning-Custom "Failed to remove Elasticsearch container" } Write-Success "Elasticsearch container removed!" # Remove the es-data volume Write-Step "Removing Elasticsearch data volume..." docker volume rm -f schon_es-data if ($LASTEXITCODE -ne 0) { Write-Warning-Custom "Failed to remove es-data volume (may not exist)" } Write-Success "Elasticsearch data volume removed!" Write-Result "" Write-Result "Elasticsearch has been wiped. Run 'make restart' to recreate and reindex."