> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/membership/roles/delete.md).

# Delete a role

Delete a custom role.

**Where:** Membership → Roles → click a role → **Actions** → **Delete** · `/projects/<project>/membership/roles/<roleId>/edit`

## Before you start

* Only **Custom** roles can be deleted; on a system role **Delete** is off.
* You need the `membership:delete` permission on roles.

## Steps

1. In **Roles**, click the role, for example `temp-role`, and open **Actions**.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-e473684c2f0265504088d12275f16c6700f6bdf5%2Froles-delete-1.png?alt=media" alt="Editing role temp-role with the Actions menu open: See documentation and Delete"><figcaption><p>The <strong>Actions</strong> menu.</p></figcaption></figure>
2. Press **Delete**. The dialog **Delete Confirmation** asks *Are you sure you want to delete?*

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-483784f266c36be9fd39e991ba4f850ce17f2455%2Froles-delete-2.png?alt=media" alt="Dialog Delete Confirmation: Are you sure you want to delete? with Cancel and Delete"><figcaption><p>The confirmation dialog.</p></figcaption></figure>
3. Press **Delete**.

## Result

Cloud goes back to **Roles**; the role is gone.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-a57581ebfeaa9a3a28678847b48879b43a3c7207%2Froles-list-1.png?alt=media" alt="Roles list without temp-role"><figcaption><p>The list after the delete.</p></figcaption></figure>

## Change or remove it later

* A deleted role cannot be brought back — [create it again](/codemash/cloud/membership/roles/new.md).

## Do it from code

```ts
await norbix.hub.membership.deleteRole({ id }); // id: pr_…_nr_…
```

```sh
norbix hub membership role delete pr_5ArJCRo2mJ90H2Fp1oU6ta_nr_2ZHOKi8YUQOhq9Mr5Gn3wT --yes
```

The client setup is on the [Membership page](/codemash/cloud/membership.md#use-it-from-code). API: [Delete Role](/codemash/api-reference/membership/roles/delete-role.md)
