How do I remove Portainer?
This will guide you through removing Portainer from Docker Standalone, Docker Swarm and Kubernetes environments.
Docker Standalone
1. Remove Portainer
Delete the Portainer container
Once the Portainer container is stopped, you can delete it using the following rm command:
docker rm portainer
Remove Portainer Agents
Delete the Portainer Agent container
Once the Portainer Agent container is stopped, you can delete it using the following rm command:
docker rm portainer_agent
For Edge Agents:
docker rm portainer_edge_agent
Docker Swarm
Remove the Edge Agent service
If you are running Portainer Edge Agents, the service for this needs to be removed before removing the Docker Swarm stack.
docker service rm portainer_edge_agent
Remove the Docker Swarm volume
The Portainer data volume can now be removed by running the following command.
Please note that this command will permanently delete your Portainer data volume.
docker volume rm portainer_portainer_data
Kubernetes Deployment
Remove the Portainer namespace
Portainer deployments created via Kubernetes can be removed by deleting the Portainer namespace. This process is the same whether Portainer was deployed via Helm or YAML.
This will remove all resources under the Portainer namespace, including Edge Agents.
Please be aware that deleting namespaces in Kubernetes can result in the permanent loss of all resources within that namespace. Proceed with caution and ensure backups are in place if needed.
kubectl delete namespace portainer
Last updated
Was this helpful?