> For the complete documentation index, see [llms.txt](https://docs.bindplane.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bindplane.com/deployment/virtual-machine/collector/install-and-uninstall-bindplane-collectors.md).

# Install and Uninstall Bindplane Collectors

The [Bindplane Collector](https://github.com/observIQ/bindplane-otel-collector) can be installed on Linux, Mac, Windows, or AIX with a single-line install script. For AIX, see [Install Bindplane Collectors on AIX](https://docs.bindplane.com/deployment/virtual-machine/collector/install-bindplane-collectors-on-aix.md).

### Installation Script

{% hint style="warning" %}
**IMPORTANT**

🚧 Install Collectors from Bindplane

To install the collector, you should get the installation script from Bindplane as outlined in [Install Your First Collector](https://docs.bindplane.com/readme/install-your-first-collector.md). Doing so ensures the collector instantly connects to Bindplane and can be managed without additional configuration.
{% endhint %}

{% hint style="info" %}
**NOTE**

📘 Collector or Agent: What's the difference?

We formerly used the terms Collector and Agent interchangeably. Collector is the preferred name, and Agent is the legacy name. If you see either throughout the product or the documentation, we're always referring to the [Bindplane Collector](https://github.com/observIQ/bindplane-otel-collector)
{% endhint %}

#### Run as Non-Root on Linux

On Linux, the collector runs as the `root` user by default. To run it as the non-root `bdot` user instead, do the following **before** you run the install command:

1. Install the `sudo` package, which upgrades from Bindplane need. Run your package manager as root, for example `apt-get install sudo` or `dnf install sudo`.
2. Create the package configuration file, `/etc/default/observiq-otel-collector` on Debian-based distributions or `/etc/sysconfig/observiq-otel-collector` on RHEL-based distributions, with this content:

   ```ini
   BDOT_UNPRIVILEGED=true
   ```
3. Install the collector with the install command from Bindplane. The package uses the values in the configuration file to choose the user the collector runs as, and creates that user if it doesn't exist.

The user that runs the collector service cannot be changed after the collector is installed. To switch, uninstall the collector, delete the installation directory (`/opt/observiq-otel-collector`), and install the collector again with the new configuration. For more details, see [Linux Package Configuration](https://docs.bindplane.com/configuration/bindplane-otel-collector/linux-package-configuration.md) and [Downgrade Collector Privileges](https://docs.bindplane.com/how-to-guides/collector-management/downgrade-collector-privileges.md).

### Uninstall The Bindplane Collector

Run the command for your operating system to uninstall the collector.

{% tabs %}
{% tab title="Linux" %}
{% code overflow="wrap" %}

```bash
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh -r
```

{% endcode %}
{% endtab %}

{% tab title="macOS" %}
{% code overflow="wrap" %}

```bash
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_macos.sh)" install_macos.sh -r
```

{% endcode %}
{% endtab %}

{% tab title="Windows" %}
{% code overflow="wrap" %}

```powershell
(Get-WmiObject -Class Win32_Product -Filter "Name = 'observIQ Distro for OpenTelemetry Collector'").Uninstall()
```

{% endcode %}

{% hint style="success" %}
**TUTORIAL**

[View step-by-step video tutorial how to install the Bindplane OTel Collector in a Windows VM.](https://www.youtube.com/watch?v=fMs70_qeTB0)
{% endhint %}

Optionally, on Windows, you can uninstall the collector via the control panel. Simply follow the steps below.

1. Navigate to the control panel, then to the "Uninstall a program" dialog.
2. Locate the `observIQ OpenTelemetry Collector` entry, and select uninstall.
3. Follow the wizard to complete the removal of the collector.
   {% endtab %}

{% tab title="AIX" %}
With `sudo` and `curl` from the AIX Toolbox for Linux Applications:

{% code overflow="wrap" %}

```sh
sudo sh -c "$(curl -fsSlL https://github.com/observIQ/bindplane-otel-collector/releases/latest/download/install_unix.sh)" install_unix.sh -r
```

{% endcode %}

Without the AIX Toolbox, run as root. This downloads the script with Perl from the base `perl.rte` fileset:

{% code overflow="wrap" %}

```sh
sh -c "$(perl -MHTTP::Tiny -e 'my $r = HTTP::Tiny->new(verify_SSL => 1)->get(shift); $r->{success} or die($r->{status} == 599 ? $r->{content} : "$r->{status} $r->{reason}\n"); print $r->{content}' https://github.com/observIQ/bindplane-otel-collector/releases/latest/download/install_unix.sh)" install_unix.sh -r
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Data That Persists After Uninstalling

Uninstalling doesn't remove the collector's installation directory: `/opt/observiq-otel-collector` on Linux and AIX, or `C:\Program Files\observIQ OpenTelemetry Collector` on Windows. If you won't reinstall the collector, delete the directory yourself.

On Windows, the directory keeps the configuration files, log files, and any queue storage. On AIX, it keeps the configuration files and any queue storage, and uninstalling removes the log files.

On Linux, as of collector v1.87.0, uninstalling removes the collector and updater binaries, `plugins/`, and `log/`. It keeps:

* `storage/`, which holds persistent queue data and file read positions.
* `manager.yaml`, which holds the Bindplane connection settings and the collector's agent ID. Uninstalling with the install script's `-r` option deletes it.
* On Debian-based distributions, `config.yaml`, `logging.yaml`, and the package configuration file `/etc/default/observiq-otel-collector`. On RHEL-based distributions, uninstalling deletes `config.yaml`, `logging.yaml`, and `/etc/sysconfig/observiq-otel-collector`.

{% hint style="warning" %}
**IMPORTANT**

Before you reinstall on Linux with a different runtime user, for example to switch between root and non-root, delete `/opt/observiq-otel-collector`. Also delete it after uninstalling any collector that ran as non-root. The files left in the directory keep their old owner: a non-root collector can't use files that root owns, and a collector installed as root would work on files the former runtime user controlled. See [Switch Between Root and Non-Root](https://docs.bindplane.com/configuration/bindplane-otel-collector/linux-package-configuration.md#switch-between-root-and-non-root).
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bindplane.com/deployment/virtual-machine/collector/install-and-uninstall-bindplane-collectors.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
