---
title: "Remove users"
description: "Remove users from an Alpacon workspace. Compare normal and purge deletion, check access and data impact, and complete the pre-removal checklist safely."
---

> Full documentation index: https://docs.alpacax.com/llms.txt

# Remove users

Remove users who no longer need access to the workspace.

## Required permissions

Removing users requires `staff` or `superuser` privileges.

## Deletion types

Alpacon provides two types of user deletion. The server-account deletion described below applies to Linux accounts Alpacon created for the user. Accounts discovered on servers remain on disk and are unlinked from the removed user.

### Normal deletion

Normal user deletion removes the user's account while **preserving their home directory on servers**.

**What happens:**

- User account deleted from workspace
- Home directory on servers moved to `/home/deleted_users/`
- Directory ownership transferred to `root` user
- Directory permissions set to `0700`

**Use when:**

- Need to preserve user data for audit or recovery
- Want option to restore files later
- Compliance requires data retention

### Purge deletion

Purge deletion completely removes the user and **all associated data from servers**.
To use this option, check the **Delete home directory** checkbox in the deletion modal.

**What happens:**

- User account deleted from workspace
- Home directory on servers permanently deleted
- All user files removed

**⚠️ Warning:** Cannot be recovered. Use with extreme caution.

**Use when:**

- User data no longer needed
- Compliance requires complete data removal
- Freeing up disk space

## How to remove

### From user detail page

1. Go to **IAM** > **Users**
2. Click the user to remove
3. Click **bin icon** in top right
4. Select deletion type: **Delete home directory** checkbox
   - **Unchecked**: Normal deletion (preserve home directory)
   - **Checked**: Purge deletion (complete deletion)
5. Click **Continue** in confirmation modal
6. View result in toast message

## Pre-removal checklist

### Data impact

User removal permanently deletes:

- User profile information
- Group memberships
- Permission settings
- Activity history

**Caution:** Cannot be recovered after deletion

### Server access

- User automatically removed from accessible servers
- Linux accounts Alpacon created for the user are deleted; the selected deletion type determines what happens to their home directories
- Accounts discovered on servers are kept and unlinked from the removed user

### Owned resources

Check resources owned by user:

- If server owner
- If group admin
- If webhook owner

Transfer ownership to another user if needed.

## Work sessions

Removing a user also affects their access:

- Approved and active work sessions assigned to the user are revoked. Their web terminals, file transfers, port forwarding, and editors close; undelivered commands and pending extensions are cancelled, and session-bound sudo permissions end.
- The user's other open web terminals and file-transfer sessions close.
- The user's personal API tokens are deleted.
- Pending session requests remain pending. Administrators should arrange for an approver to reject them or a Superuser to cancel them.

See [Session lifecycle](/use/work-sessions/detail/#session-lifecycle) for statuses and who can end a session.

## Leave a workspace

To leave a workspace, ask a workspace administrator to [remove your account](/use/iam/users/remove/#how-to-remove). You cannot leave a workspace on your own.

## Removing Superusers

Considerations when removing Superusers:

**Maintain minimum 1 Superuser:**

- Workspace always needs at least 1 Superuser
- Cannot remove last Superuser
- Promote another user to Superuser first

## After removal

After user removal:

- User excluded from workspace list
- No email notification sent
- Can be re-invited with same email

## Deactivate vs Remove

| Action     | Effect                            | Recovery       |
| ---------- | --------------------------------- | -------------- |
| Deactivate | Block login, keep data            | Can reactivate |
| Remove     | Complete deletion, data permanent | Cannot recover |

**Recommended:** Use deactivation for temporary access restriction

## Troubleshooting

**Remove button disabled:**

- Verify Staff or Superuser permissions
- Check if last Superuser

**"Cannot delete last superuser" error:**

- Promote another user to Superuser first
- Then proceed with removal

## Audit log

User removal is logged in audit logs:

- Admin who removed
- Removal time
- Removed user information

## Related docs

- [Add users](/use/iam/users/add/)
- [Manage users](/use/iam/users/manage/)
- [Manage groups](/use/iam/groups/manage/)

Source: https://docs.alpacax.com/use/iam/users/remove/
