Docker - Delete stacks using the docker stack rm command
by
Jeremy Canfield |
Updated: February 12 2022
| Docker articles
Before using the docker stack rm command to remove a stack, you will probably want to first use the docker stack ls command can be used to list the stacks. This command must be run from the swarm manager. Something like this should be returned.
~]# docker stack ls
NAME SERVICES ORCHESTRATOR
foo 3 Swarm
bar 1 Swarm
Let's say you want to remove the "foo" stack. If the removal is successful, something like this should be displayed.
Any container associated with the stack should also be removed.
~]# docker stack rm foo
Removing service foo
Removing network foo
Did you find this article helpful?
If so, consider buying me a coffee over at