github.com/AliyunContainerService/cli@v0.0.0-20181009023821-814ced4b30d0/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  <!-- This file is maintained within the docker/cli GitHub
     8       repository at https://github.com/docker/cli/. Make all
     9       pull requests against that repo. If you see this file in
    10       another repository, consider it read-only there, as it will
    11       periodically be overwritten by the definitive file. Pull
    12       requests which include edits to this file in other repositories
    13       will be rejected.
    14  -->
    15  
    16  # stack rm
    17  
    18  ```markdown
    19  Usage:  docker stack rm [OPTIONS] STACK [STACK...]
    20  
    21  Remove one or more stacks
    22  
    23  Aliases:
    24    rm, remove, down
    25  
    26  Options:
    27        --help                  Print usage
    28        --kubeconfig string     Kubernetes config file
    29        --namespace string      Kubernetes namespace to use
    30        --orchestrator string   Orchestrator to use (swarm|kubernetes|all)
    31  ```
    32  
    33  ## Description
    34  
    35  Remove the stack from the swarm. This command has to be run targeting
    36  a manager node.
    37  
    38  ## Examples
    39  
    40  ### Remove a stack
    41  
    42  This will remove the stack with the name `myapp`. Services, networks, and secrets associated with the stack will be removed.
    43  
    44  ```bash
    45  $ docker stack rm myapp
    46  
    47  Removing service myapp_redis
    48  Removing service myapp_web
    49  Removing service myapp_lb
    50  Removing network myapp_default
    51  Removing network myapp_frontend
    52  ```
    53  
    54  ### Remove multiple stacks
    55  
    56  This will remove all the specified stacks, `myapp` and `vossibility`. Services, networks, and secrets associated with all the specified stacks will be removed.
    57  
    58  ```bash
    59  $ docker stack rm myapp vossibility
    60  
    61  Removing service myapp_redis
    62  Removing service myapp_web
    63  Removing service myapp_lb
    64  Removing network myapp_default
    65  Removing network myapp_frontend
    66  Removing service vossibility_nsqd
    67  Removing service vossibility_logstash
    68  Removing service vossibility_elasticsearch
    69  Removing service vossibility_kibana
    70  Removing service vossibility_ghollector
    71  Removing service vossibility_lookupd
    72  Removing network vossibility_default
    73  Removing network vossibility_vossibility
    74  ```
    75  
    76  ## Related commands
    77  
    78  * [stack deploy](stack_deploy.md)
    79  * [stack ls](stack_ls.md)
    80  * [stack ps](stack_ps.md)
    81  * [stack services](stack_services.md)