Skip to content

bhatti user delete

bhatti user delete server only

Section titled “bhatti user delete ”

Delete a user.

sudo bhatti user delete <name> [-y]

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

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

Terminal window
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.

Terminal window
sudo bhatti user delete alice
Delete user "alice"? [y/N]: y
deleted user "alice"
Terminal window
# Active sandboxes still around
sudo bhatti user delete alice
Error: user "alice" has 3 active sandbox(es)
FlagDefaultDescription
-y, --yesfalseSkip confirmation.

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