Skip to content

bhatti user delete

bhatti user delete server only

Delete a user.

Synopsis

sudo bhatti user delete <name> [-y]

Description

Removes the user record. The user's API key stops working immediately.

Fails if the user has active (non-destroyed) sandboxes. Destroy them first:

sudo bhatti user list                               # find them via the user's sandbox count
# (server-side — to list a specific user's sandboxes you need the SQL or the user's API key)

Volumes, secrets, snapshots, and images owned by the user remain on disk after the user is deleted (orphaned). A future --purge mode could clean these up; for now, manual cleanup is required if you want to reclaim the space.

By default, prompts for confirmation. In a non-interactive shell without -y, the command refuses and exits 1.

Records a user.deleted event in the audit log.

Examples

sudo bhatti user delete alice
Delete user "alice"? [y/N]: y
deleted user "alice"
# Active sandboxes still around
sudo bhatti user delete alice
Error: user "alice" has 3 active sandbox(es)

Options

| Flag | Default | Description | | ---- | ------- | ----------- | | -y, --yes | false | Skip confirmation. |

See Global flags for --url, --token, --json, --timing, --data-dir.

See also