# IRPCVaultsAdmin.DestroyVault

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [Vault management](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/DestroyVault/

Badges: `Administration API / specialized` `admin` `session`

Destroys a vault: deletes its metadata database and its file data permanently and removes it from
the server.

- **Service:** [Vault management](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/index.md) `MFiles.IRPCVaultsAdmin`
- **gRPC method:** `/MFiles.IRPCVaultsAdmin/DestroyVault`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/destroy-vault`
- **Request:** [`DestroyVaultRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/DestroyVault/index.md#request)
- **Response:** [`DestroyVaultResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/DestroyVault/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- **Destroys the vault and its data permanently.** Use
  [DetachVault](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/DetachVault/index.md) to remove the vault from the server
  and keep the data.
- Requires the system administrator server role (server right `manage_vaults`).
- The vault is taken offline first: open sessions to the vault are disconnected.
- With `force` false, the call fails if the server cannot connect to the vault's SQL Server; with
  `force` true the vault is destroyed anyway and its database may be left on that SQL Server.

<a id="request"></a>

## Request: DestroyVaultRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `vault` | `string` | The GUID of the vault to destroy, in braces, e.g. `{7BBEA0BC-40D8-4BCB-A67D-8A3ACFBDB575}`. |
| `force` | `bool` | True to destroy the vault even if the server cannot connect to the vault's database server; the database may then be left on that server. False to fail in that case. |

<a id="response"></a>

## Response: DestroyVaultResponse

No fields.

<a id="related"></a>

## Related methods

- [DetachVault](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/DetachVault/index.md): Removes the vault from the server's list of registered vaults but does not remove the metadata database or file data files.
