> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nx1cloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Archive or delete a rule

> Archive a rule to take it out of use, or delete it and its versions.

You can archive a rule to take it out of use while keeping every version and its publication history.
You can also undo an archive.

Unlike archiving, you can delete a rule to remove it and its versions for good. NexusOne
keeps the audit records and adds an event for the deletion.

> [!WARNING]
>
> Deleting a rule can't be undone.

## Prerequisites

Before starting this task, ensure you have the following:

* Required role: [`workspace_admin` in a workspace](https://docs.nx1cloud.com/documentation/data/overview/business-rules#roles-and-permissions)
* An existing [rule that isn't published](https://docs.nx1cloud.com/documentation/data/tasks/business-rules/rules/create-a-rule.md)

## Steps

> [tab] Web portal
>
> Perform these steps to archive or delete a rule:
>
> 1. Log in to NexusOne.
> 2. On the top navigation bar, hover your mouse over **Data** and then select **Business Rules**.
> 3. Select a workspace.
> 4. Select a rule.
> 5. Click **Remove**. If a rule is published, then the dialog asks you to unpublish it first and offers no options.
> 6. Choose one of the following:
>
>    * To archive a rule, click **Archive decision**.
>    * To delete a rule and every version of it, type its key under **Delete permanently**
>      and then click **Delete permanently**.

> [tab] REST API
>
> Use the [Archive a decision or delete it and its versions](https://docs.nx1cloud.com/api-reference/endpoints/decisions/archive-a-decision-or-delete-it-and-its-versions.md) endpoint to archive or delete a rule.
>
> To delete a rule instead of archiving it, set `purge` to `true`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.