Skip to content

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)

# 删除数据目录(含数据库、配置、日志)
sudo rm -rf /data/opsant

⚠ 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)

docker rmi registry.cn-beijing.aliyuncs.com/opsany/opsany-proxy-opsant:2.3.5

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:

docker network ls | grep opsany
docker network rm <网络名>