> For the complete documentation index, see [llms.txt](https://delta-robotics.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://delta-robotics.gitbook.io/docs/tutorials/thermoflex/uninstall-thermoflex-api.md).

# Uninstall the ThermoFlex™ API

Completely remove the ThermoFlex Python API and its Python runtime when you want a clean slate, with Windows steps and macOS or Linux equivalents

Sometimes you need a clean slate: a stubborn bug to clear, or a fresh install to prepare. This guide removes three things:

* The `thermoflex` Python package
* Python itself (optional)
* Any leftover environment variables or cached data

{% hint style="warning" %}
These steps are written for Windows, where most kit users start. macOS and Linux differ mainly in how you remove Python and edit your PATH. Where they do, use the tab for your system.
{% endhint %}

{% stepper %}
{% step %}

### Uninstall the ThermoFlex Python package

Uninstalling the package with `pip` works the same everywhere. Run it again until pip confirms the package is gone.

{% tabs %}
{% tab title="Windows" %}

```powershell
pip uninstall thermoflex
```

For a specific Python version, use the launcher:

```powershell
py -3.11 -m pip uninstall thermoflex
```

{% endtab %}

{% tab title="macOS / Linux" %}

```bash
python3 -m pip uninstall thermoflex
```

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Uninstall Python (optional)

Only do this if you want Python gone entirely. If other projects use it, skip this step.

{% tabs %}
{% tab title="Windows" %}
Uninstall from the Windows UI:

1. Press `Win + R`, type `appwiz.cpl`, and press Enter.
2. Find any Python entries and click **Uninstall**.
   {% endtab %}

{% tab title="macOS" %}
If you installed Python from python.org, remove its framework and app folder:

```bash
sudo rm -rf /Library/Frameworks/Python.framework
sudo rm -rf "/Applications/Python 3.13"
```

If you installed it with Homebrew, use `brew uninstall python` instead.
{% endtab %}

{% tab title="Linux" %}
Don't remove the system Python that ships with your distribution; other tools depend on it. Uninstall only versions you installed yourself, for example with `sudo apt remove python3.x` for a manually added version.
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Clean up leftover folders

Remove cached files and any manually installed copies.

{% tabs %}
{% tab title="Windows" %}

```powershell
Remove-Item "$env:LocalAppData\Programs\Python" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item "$env:AppData\Python" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item "$env:LocalAppData\pip" -Recurse -Force -ErrorAction SilentlyContinue
```

{% endtab %}

{% tab title="macOS" %}

```bash
rm -rf ~/Library/Caches/pip
```

{% endtab %}

{% tab title="Linux" %}

```bash
rm -rf ~/.cache/pip
```

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Remove environment variables

Python can leave entries behind in your PATH. This part is system-specific.

{% tabs %}
{% tab title="Windows" %}
Strip Python and pip entries from your user PATH, then clear any custom variables:

```powershell
$envVars = [System.Environment]::GetEnvironmentVariable("Path", "User") -split ";"
$filtered = $envVars | Where-Object { $_ -notmatch "Python" -and $_ -notmatch "pip" }
[System.Environment]::SetEnvironmentVariable("Path", ($filtered -join ";"), "User")

[System.Environment]::SetEnvironmentVariable("PYTHONPATH", $null, "User")
[System.Environment]::SetEnvironmentVariable("PYTHONHOME", $null, "User")
```

{% endtab %}

{% tab title="macOS / Linux" %}
Open your shell profile (`~/.zshrc` on modern macOS, `~/.bashrc` on most Linux setups) and delete any lines that add Python to your `PATH` or set `PYTHONPATH` or `PYTHONHOME`. Then reload the profile:

```bash
source ~/.zshrc
```

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Confirm it's gone

Check that the system can no longer find Python.

{% tabs %}
{% tab title="Windows" %}

```powershell
where python
```

{% endtab %}

{% tab title="macOS / Linux" %}

```bash
which python3
```

{% endtab %}
{% endtabs %}

If it returns nothing, you're fully clean.
{% endstep %}
{% endstepper %}

## Related pages

* [Set up software and drivers](/docs/tutorials/thermoflex/getting-started-with-our-evaluation-kit/update-library-and-firmware.md): reinstall Python and the API when you're ready to start fresh.
* [Getting started with the evaluation kit](/docs/tutorials/thermoflex/getting-started-with-our-evaluation-kit.md): the full setup walkthrough from the top.
* [Troubleshooting](/docs/help/troubleshooting.md): fixes for the problems that made you want a clean slate.
