github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/docs/user_docs/installation/uninstall-kbcli-and-kubeblocks.md (about)

     1  ---
     2  title: Uninstall kbcli and KubeBlocks
     3  description: Handle exception and uninstall kbcli and KubeBlocks
     4  keywords: [kbcli, kubeblocks, exception, uninstall]
     5  sidebar_position: 5
     6  sidebar_label: Uninstall KubeBlocks and kbcli
     7  ---
     8  
     9  import Tabs from '@theme/Tabs';
    10  import TabItem from '@theme/TabItem';
    11  
    12  
    13  # Uninstall KubeBlocks and kbcli
    14  
    15  Uninstallation order:
    16  
    17  1. Delete your cluster if you have created a cluster.
    18  
    19     ```bash
    20     kbcli cluster delete <name>
    21     ```
    22  
    23  2. Uninstall KubeBlocks.
    24  
    25  3. Uninstall kbcli.
    26  
    27  ## Uninstall KubeBlocks
    28  
    29  Uninstall KubeBlocks if you want to delete KubeBlocks after your trial.
    30  
    31  <Tabs>
    32  <TabItem value="kbcli" label="kbcli" default>
    33  
    34  ```bash
    35  kbcli kubeblocks uninstall
    36  ```
    37  
    38  </TabItem>
    39  
    40  <TabItem value="Helm" label="Helm" default>
    41  
    42  ```bash
    43  helm uninstall kubeblocks --namespace kb-system
    44  ```
    45  
    46  Helm does not delete CRD objects. You can delete the ones KubeBlocks created with the following commands:
    47  ```bash
    48  kubectl get crd -o name | grep kubeblocks.io | xargs kubectl delete
    49  ```
    50  
    51  
    52  </TabItem>
    53  
    54  <TabItem value="YAML" label="YAML" default>
    55  
    56  You can generate YAMLs from the KubeBlocks chart and uninstall using kubectl.
    57  
    58  ```bash
    59  helm template kubeblocks kubeblocks/kubeblocks --namespace kb-system | kubectl delete -f -
    60  ```
    61  
    62  
    63  </TabItem>
    64  
    65  </Tabs>
    66  
    67  
    68  ## Uninstall kbcli
    69  
    70  Uninstall kbcli if you want to delete kbcli after your trial. Use the same option as the way you install kbcli.
    71  
    72  <Tabs>
    73  <TabItem value="macOS" label="macOS" default>
    74  
    75  For `curl`, run
    76  
    77  ```bash
    78  sudo rm /usr/local/bin/kbcli
    79  ```
    80  
    81  For `brew`, run
    82  
    83  ```bash
    84  brew uninstall kbcli
    85  ```
    86  
    87  kbcli creates a hidden folder named `~/.kbcli` under the HOME directory to store configuration information and temporary files. You can delete this folder after uninstalling kbcli.
    88  
    89  </TabItem>
    90  
    91  <TabItem value="Windows" label="Windows">
    92  
    93  1. Go to the `kbcli` installation path and delete the installation folder.
    94  
    95     * If you install `kbcli` by script, go to `C:\Program Files` and delete the `kbcli-windows-amd64` folder.
    96     * If you customize the installation path, go to your specified path and delete the installation folder.
    97  
    98  2. Delete the environment variable.
    99  
   100     1. Click the Windows icon and click **System**.
   101     2. Go to **Settings** -> **Related Settings** -> **Advanced system settings**.
   102     3. On the **Advanced** tab, click **Environment Variables**.
   103     4. Double-click **Path** in **User variables** or **System variables** list.
   104        * If you install `kbcli` by script, double-click **Path** in **User variables**.
   105        * If you customize the installation path, double-click **Path** based on where you created the variable before.
   106     5. Select `C:\Program Files\kbcli-windows-amd64` or your customized path and delete it. This operation requires double confirmation.
   107  
   108  3. Delete a folder named `.kbcli`.
   109  
   110     kbcli creates a folder named `.kbcli` under the C:\Users\username directory to store configuration information and temporary files. You can delete this folder after uninstalling kbcli.
   111  
   112  </TabItem>
   113  
   114  <TabItem value="Linux" label="Linux">
   115  
   116  Uninstall kbcli using the `curl` command.
   117  
   118  ```bash
   119  sudo rm /usr/local/bin/kbcli
   120  ```
   121  
   122  kbcli creates a hidden folder named `~/.kbcli` under the HOME directory to store configuration information and temporary files. You can delete this folder after uninstalling kbcli.
   123  
   124  </TabItem>
   125  
   126  </Tabs>