> For the complete documentation index, see [llms.txt](https://docs.threatdefence.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.threatdefence.com/endpoint-agent/troubleshooting/cleanup-tool.md).

# Clean-up Tool

## Overview

In situations where the standard uninstallation process cannot be used, ThreatDefence provides a **Cleanup Tool**. This utility completely removes the **TD\_Endpoint** software from a host system.

***

> **Caution:**\
> The cleanup script does **not** prompt for confirmation. Once executed, **TD\_Endpoint will be removed immediately**. Use this tool only when standard uninstall methods (e.g., Control Panel, command-line uninstall) are unavailable or have failed.

***

## Download

The Cleanup Tool can be downloaded here:

{% file src="/files/sS2856ncu26V9X20vdPa" %}

### Example Usage <a href="#example-usage" id="example-usage"></a>

```
PS /> powershell -ep bypass -f .\TD_Endpoint-Cleanup_Tool.ps1 -Uninstall -Force
```

### All Parameters <a href="#all-parameters" id="all-parameters"></a>

```
TD_Endpoint Cleanup Tool
Version 00B
ThreatDefence Pty Ltd
Copyright 2024

Usage: .\TD_Endpoint-Cleanup_Tool.ps1 [-Uninstall] [-Force] [-DisableSysmonOnly] [-SysmonDeepCleanup] [-Help]

Parameters:
  -Force               : Force uninstallation of TDAgent and removal of all residual files/keys
  -DisableSysmonOnly   : Only disable sysmon via tdcli.exe (default is false).
  -SysmonDeepCleanup   : Deep clean up sysmon and purge all residual files for it (default is false).
  -Uninstall           : Uninstall TD_Endpoint (default is false).
  -Help                : Show this help information.
```

> **Note:** Powershell must be run as administrator.


---

# 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.threatdefence.com/endpoint-agent/troubleshooting/cleanup-tool.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.
