Skip to content

Lightweight server monitoring with historical data, docker stats, and alerts.

remove agent data directory on uninstall

henrygdd591da46f3dd
diff --git a/supplemental/scripts/install-agent.sh b/supplemental/scripts/install-agent.sh
index c978ce8d6..6abbd669a 100755
--- a/supplemental/scripts/install-agent.sh
+++ b/supplemental/scripts/install-agent.sh
@@ -757,6 +757,9 @@ if [ "$UNINSTALL" = true ]; then
echo "Removing the Beszel Agent directory..."
rm -rf "$AGENT_DIR"
+ echo "Removing the Beszel Agent data directory..."
+ rm -rf /var/lib/beszel-agent
+
echo "Removing the dedicated user for the agent service..."
killall beszel-agent 2>/dev/null || true # Usually already stopped by the service manager.
if id -u beszel >/dev/null 2>&1; then