> For the complete documentation index, see [llms.txt](https://securitybot.gitbook.io/securitybot-knowledge-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://securitybot.gitbook.io/securitybot-knowledge-hub/command-reference/purge.md).

# /purge

Manage SecurityBot's autopurge feature. Autopurge runs on a recurring schedule and removes unverified members and known scammers; you can also run a one-time manual purge.

***

## Usage

| Subcommand | Options | Permission | Tier      | Description                                          |
| ---------- | ------- | ---------- | --------- | ---------------------------------------------------- |
| `run`      | None    | Admin      | Premium   | Runs a one-time manual purge immediately             |
| `enable`   | None    | Admin      | Premium   | Enables scheduled autopurge (shows a confirm prompt) |
| `disable`  | None    | Admin      | All tiers | Disables scheduled autopurge                         |
| `view`     | None    | Admin      | All tiers | Shows current autopurge state and behavior           |

### Example

```
/purge view
```

```
/purge enable
```

```
/purge run
```

***

## Subcommands

### `/purge run`

{% hint style="info" %}
**Premium Feature** -- `/purge run` requires a Premium subscription. [Compare plans →](/securitybot-knowledge-hub/plans-and-pricing/plans-and-pricing.md)
{% endhint %}

Runs a one-time manual purge immediately. SecurityBot shows a "starting purge" message, then updates it with the results: the number of members kicked and banned. A `PURGE_COMPLETION_ALERT` is also sent to the configured log channel.

### `/purge enable`

{% hint style="info" %}
**Premium Feature** -- `/purge enable` requires a Premium subscription. [Compare plans →](/securitybot-knowledge-hub/plans-and-pricing/plans-and-pricing.md)
{% endhint %}

Enables scheduled autopurge for your server. SecurityBot first shows a confirmation prompt with **Confirm** and **Cancel** buttons; clicking **Confirm** turns autopurge on, and clicking **Cancel** leaves it off.

Once enabled, autopurge runs on a recurring schedule (every 30 minutes) and will:

* **Kick** unverified members (no roles, joined more than 5 minutes ago).
* **Ban** members listed as known scammers in the SecurityBot scammer list.

### `/purge disable`

{% hint style="success" %}
**Available on all tiers** -- admins can always turn autopurge off, even on the free tier.
{% endhint %}

Disables scheduled autopurge for your server. The next scheduled run will not execute. There is no confirmation step.

### `/purge view`

{% hint style="success" %}
**Available on all tiers**
{% endhint %}

Shows whether autopurge is currently enabled and a summary of what it does. Free-tier servers also see an upgrade prompt explaining that enabling autopurge requires Premium.

***

## Behavior

* **Kicks** members who have no roles and joined more than 5 minutes ago (unverified).
* **Bans** members who are flagged in the SecurityBot scammer list.
* Manual runs (`/purge run`) and scheduled runs both report results to the configured log channel.

***

## Permissions

**Administrator** -- All `/purge` subcommands require the SecurityBot admin role, Discord ADMINISTRATOR permission, or server ownership.


---

# 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://securitybot.gitbook.io/securitybot-knowledge-hub/command-reference/purge.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.
