github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/cli/docs/reference/commandline/stack_rm.md (about)

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