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