github.com/wmuizelaar/kpt@v0.0.0-20221018115725-bd564717b2ed/site/reference/cli/live/destroy/README.md (about)

     1  ---
     2  title: "`destroy`"
     3  linkTitle: "destroy"
     4  type: docs
     5  description: >
     6    Remove all previously applied resources in a package from the cluster
     7  ---
     8  
     9  <!--mdtogo:Short
    10      Remove all previously applied resources in a package from the cluster
    11  -->
    12  
    13  `destroy` removes all files belonging to a package from the cluster.
    14  
    15  ### Synopsis
    16  
    17  <!--mdtogo:Long-->
    18  
    19  ```
    20  kpt live destroy [PKG_PATH | -]
    21  ```
    22  
    23  #### Args
    24  
    25  ```
    26  PKG_PATH | -:
    27    Path to the local package which should be deleted from the cluster. It must
    28    contain a Kptfile or a ResourceGroup manifest with inventory metadata.
    29    Defaults to the current working directory.
    30    Using '-' as the package path will cause kpt to read resources from stdin.
    31  ```
    32  
    33  #### Flags
    34  
    35  ```
    36  --dry-run:
    37    It true, kpt will print the resources that will be removed from the cluster,
    38    but no resources will be deleted.
    39  
    40  --inventory-policy:
    41    Determines how to handle overlaps between the package being currently applied
    42    and existing resources in the cluster. The available options are:
    43  
    44      * strict: If any of the resources already exist in the cluster, but doesn't
    45        belong to the current package, it is considered an error.
    46      * adopt: If a resource already exist in the cluster, but belongs to a
    47        different package, it is considered an error. Resources that doesn't belong
    48        to other packages are adopted into the current package.
    49  
    50    The default value is `strict`.
    51  
    52  --output:
    53    Determines the output format for the status information. Must be one of the following:
    54  
    55      * events: The output will be a list of the status events as they become available.
    56      * json: The output will be a list of the status events as they become available,
    57        each formatted as a json object.
    58      * table: The output will be presented as a table that will be updated inline
    59        as the status of resources become available.
    60  
    61    The default value is ‘events’.
    62  
    63  --show-status-events:
    64    The output will include the details on the reconciliation status
    65    for all resources. Default is `false`.
    66  
    67    Does not apply for the `table` output format.
    68  ```
    69  
    70  <!--mdtogo-->
    71  
    72  ### Examples
    73  
    74  <!--mdtogo:Examples-->
    75  
    76  ```shell
    77  # remove all resources in the current package from the cluster.
    78  $ kpt live destroy
    79  ```
    80  
    81  <!--mdtogo-->