> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-auto-cli-sdk-preview-pr-398.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# vastai tfa delete

Remove a 2FA method from your account

## Usage

```bash theme={null}
vastai tfa delete [--id-to-delete ID] [--code CODE] [--method-type METHOD_TYPE] [--secret SECRET] [--backup-code BACKUP_CODE] [--method-id ID]
```

## Options

<ParamField path="--id-to-delete" type="integer">
  ID of the 2FA method to delete (see `vastai tfa status`)
</ParamField>

<ParamField path="--code" type="string">
  2FA code from your Authenticator app, SMS, or Email to authorize deletion
</ParamField>

<ParamField path="--method-type" type="string">
  2FA Method type. Only use when you only have one method of this type
  Allowed values: email, sms, totp
</ParamField>

<ParamField path="--secret" type="string">
  Secret token (required for SMS or Email 2FA)
</ParamField>

<ParamField path="--backup-code" type="string">
  One-time backup code (alternative to regular 2FA code)
</ParamField>

<ParamField path="--method-id" type="string">
  2FA Method ID to use if you have more than one of the same type ('id' from `tfa status`)
</ParamField>

## Description

Remove a 2FA method from your account.

This action requires 2FA verification to prevent unauthorized removals.

***

NOTE: If you do not specify --id-to-delete, the system will attempt to delete the method you are using to authenticate.
However please be advised, it is much safer to specify the ID to avoid confusion if you have multiple methods.

***

Use `vastai tfa status` to see your active methods and their IDs.

## Examples

```bash theme={null}
# Delete method #123, authorize with email code and secret from `tfa send-email`
 vastai tfa delete --id-to-delete 123 --method-type email --secret abc123def456 -c 456789

 # Delete method #123, authorize with TOTP/Authenticator code
 vastai tfa delete --id-to-delete 123 --method-type totp --code 456789

 # Delete method #123, authorize with SMS and secret from `tfa send-sms`
 vastai tfa delete -id 123 --method-type sms --secret abc123def456 -c 456789

 # Delete method #123, authorize with backup code
 vastai tfa delete --id-to-delete 123 --backup-code ABCD-EFGH-IJKL

 # Delete method #123, specify which TOTP method to use if you have multiple
 vastai tfa delete -id 123 --method-id 456 -c 456789

 # Delete the TOTP method you are using to authenticate (use with caution)
 vastai tfa delete -c 456789
```

## Global Options

The following options are available for all commands:

| Option          | Description                                           |
| --------------- | ----------------------------------------------------- |
| `--url URL`     | Server REST API URL                                   |
| `--retry N`     | Retry limit                                           |
| `--raw`         | Output machine-readable JSON                          |
| `--explain`     | Verbose explanation of API calls                      |
| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) |
