All Products
Search
Document Center

Key Management Service:deleteKey

Last Updated:Mar 31, 2026

Deletes a key from a Hardware Security Module (HSM). You can delete one key per command.

Prerequisites

Before you begin, make sure that you have:

Usage notes

  • Only the key owner can delete a key. Users who have access to a shared key can use it for encryption but cannot delete it.

  • Deleting one key from a key pair does not affect the other key in the pair.

Syntax

deleteKey -k
Important

Enter parameters in the order shown in the syntax.

Parameters

For details on parameters, see Parameters.

ParameterDescriptionRequiredValid values
-kKey handle of the key to delete. Use findKey to get the key handle.YesA valid key handle integer

Examples

Delete a key

Deletes the key with handle 6.

deleteKey -k 6

Output:

Cfm3DeleteKey returned: 0x00 : HSM Return: SUCCESS

Cluster Status:
Node id 0 status: 0x00000000 : HSM Return: SUCCESS

Related topics

  • findKey — Find key handles before deleting keys