> For the complete documentation index, see [llms.txt](https://docs.cybus.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cybus.io/documentation/agents/agents-in-kubernetes/uninstalling-connectware-agents-with-the-connectware-agent-helm-chart.md).

# Uninstalling Connectware Agents with the connectware-agent Helm Chart

## Prerequisites

* [Helm version 4](https://helm.sh/docs/intro/quickstart/#install-helm) is installed on your system.
* [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) is installed on your system.
* kubectl configured with the current context pointing to your target cluster ([Configure Access to Multiple Clusters](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/)).

## Uninstalling All Agents from One Installation

To remove all agents installed with the `connectware-agent` Helm chart, run the `helm uninstall` command followed by the name of your installation (also known as the *release*). You assigned this name yourself when deploying with the `connectware-agent` chart.

In the examples provided in this documentation, the release is called `connectware-agent`. If you’re unsure of the name you chose, you can look it up by running `helm list` for the namespace where you installed your agents.

**Example**

{% code lineNumbers="true" %}

```bash
helm list -n ${NAMESPACE}
```

{% endcode %}

Replace `${NAMESPACE}` with the namespace where you installed your agents.

{% code lineNumbers="true" %}

```bash
NAME             	NAMESPACE         	REVISION	UPDATED                                	STATUS  	CHART                    	APP VERSION
connectware-agent	connectware-staging	1       	2026-04-08 14:49:49.29654165 +0200 CEST	deployed	connectware-agent-3.0.0 	2.3.0
```

{% endcode %}

Once you have determined the name of your installation, you can uninstall it.

**Example**

{% code lineNumbers="true" %}

```bash
helm uninstall -n ${NAMESPACE} connectware-agent
```

{% endcode %}

This terminates running pods and removes their Kubernetes objects. However, PersistentVolumeClaims and their associated PersistentVolumes are retained. If you wish to clean them up, you can do so by using the label `app.kubernetes.io/instance` in combination with `kubectl delete`. The value for this label is the release name you already used to uninstall.

**Example**

{% code lineNumbers="true" %}

```bash
kubectl delete -n ${NAMESPACE} pvc -l app.kubernetes.io/instance=connectware-agent
```

{% endcode %}

## Uninstalling Single Agents from a Larger Installation

* To remove specific agents while keeping others, delete their entries from the `protocolMapperAgents` list in your `values.yaml` file and apply the changes with `helm upgrade`.

**Example**

1. To remove the agent `welder-robots`, delete its entry from the `protocolMapperAgents` list:

{% code title="values.yaml" lineNumbers="true" %}

```yaml
protocolMapperAgentDefaults:
  connectwareHost: connectware.cybus # adjust to actual hostname of Connectware
protocolMapperAgents:
  - name: bender-robots
    resources:
      limits:
        cpu: 2000m
        memory: 4000Mi
  #- name: welder-robots # welder-robots will be removed with helm upgrade
  #  resources:
  #    limits:
  #      cpu: 500m
  #      memory: 1000Mi
  - name: painter-robots
    resources:
      limits:
        cpu: 1000m
        memory: 2000Mi
```

{% endcode %}

2. Apply the changes:

{% code lineNumbers="true" %}

```bash
helm upgrade connectware-agent oci://repo.cybus.io/charts/connectware-agent -f values.yaml -n ${NAMESPACE}
```

{% endcode %}

This deletes the pods and Kubernetes objects of the removed agents. PersistentVolumeClaims are retained and must be cleaned up manually.

3. List all available PersistentVolumeClaims to find the ones to delete:

{% code lineNumbers="true" %}

```bash
kubectl get pvc -n ${NAMESPACE} -l app.kubernetes.io/component=protocol-mapper-agent
```

{% endcode %}

4. Delete the specific PersistentVolumeClaims associated with the removed agent. Replace `data-connectware-agent-welder-robots-0` with the actual PVC name from the list above.

{% code lineNumbers="true" %}

```bash
kubectl delete pvc -n ${NAMESPACE} data-connectware-agent-welder-robots-0
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cybus.io/documentation/agents/agents-in-kubernetes/uninstalling-connectware-agents-with-the-connectware-agent-helm-chart.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
