github.com/thajeztah/cli@v0.0.0-20240223162942-dc6bfac81a8b/docs/reference/commandline/stack_rm.md (about)

     1  # stack rm
     2  
     3  <!---MARKER_GEN_START-->
     4  Remove one or more stacks
     5  
     6  ### Aliases
     7  
     8  `docker stack rm`, `docker stack remove`, `docker stack down`
     9  
    10  
    11  <!---MARKER_GEN_END-->
    12  
    13  ## Description
    14  
    15  Remove the stack from the swarm.
    16  
    17  > **Note**
    18  >
    19  > This is a cluster management command, and must be executed on a swarm
    20  > manager node. To learn about managers and workers, refer to the
    21  > [Swarm mode section](https://docs.docker.com/engine/swarm/) in the
    22  > documentation.
    23  
    24  ## Examples
    25  
    26  ### Remove a stack
    27  
    28  This will remove the stack with the name `myapp`. Services, networks, and secrets
    29  associated with the stack will be removed.
    30  
    31  ```console
    32  $ docker stack rm myapp
    33  
    34  Removing service myapp_redis
    35  Removing service myapp_web
    36  Removing service myapp_lb
    37  Removing network myapp_default
    38  Removing network myapp_frontend
    39  ```
    40  
    41  ### Remove multiple stacks
    42  
    43  This will remove all the specified stacks, `myapp` and `vossibility`. Services,
    44  networks, and secrets associated with all the specified stacks will be removed.
    45  
    46  ```console
    47  $ docker stack rm myapp vossibility
    48  
    49  Removing service myapp_redis
    50  Removing service myapp_web
    51  Removing service myapp_lb
    52  Removing network myapp_default
    53  Removing network myapp_frontend
    54  Removing service vossibility_nsqd
    55  Removing service vossibility_logstash
    56  Removing service vossibility_elasticsearch
    57  Removing service vossibility_kibana
    58  Removing service vossibility_ghollector
    59  Removing service vossibility_lookupd
    60  Removing network vossibility_default
    61  Removing network vossibility_vossibility
    62  ```
    63  
    64  ## Related commands
    65  
    66  * [stack deploy](stack_deploy.md)
    67  * [stack ls](stack_ls.md)
    68  * [stack ps](stack_ps.md)
    69  * [stack services](stack_services.md)