Uninstall¶
This page describes how to uninstall OpsAnt.
Stop and remove the container¶
# 停止所有 OpsAnt 相关容器
docker stop $(docker ps -aq --filter "name=opsany")
docker stop $(docker ps -aq --filter "name=opsmini")
# 删除容器
docker rm $(docker ps -aq --filter "name=opsany")
docker rm $(docker ps -aq --filter "name=opsmini")
Delete data (optional, proceed with caution)¶
Deleting the data directory will permanently erase all host, task, and configuration data, and cannot be recovered. Please confirm that you have made a backup before uninstalling.
Delete the image (optional)¶
Uninstall OpsMini Agent¶
Stop and uninstall OpsMini Agent on the onboarded host:
sudo systemctl stop opsmini
sudo systemctl disable opsmini
# 删除 OpsMini 目录
sudo rm -rf /data/opsmini
Clean up the network¶
If a custom Docker network was used, clean it up as well: