Find answers instantly with AI search. Start typing your prompt below and let AI do the digging for you!

Deleting Keys

Command

To delete a key from sagacli, you can use the key delete command in the following manner:

sagacli keys delete <keyname>

Deleting Key Example

In the following example, we have a key called test that we'd like to delete from sagacli

Here are the details of the key indicating that it is present in sagacli

$ sagacli keys show test1
- address: saga1z0uscdcprxcun2mlnyrz5kelemmjw768sdrgz5
  name: test1
  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A+u4iLJZWZHHcRIEbme8ppbmk1jYTpZVio8anPqAIQ31"}'
  type: local

Note: It is a good idea to get prompted for confirmation while deleting a key. However, if you do not wish to be prompted for confirmation, simply pass the -y flag:

To delete with confirmation:

Checking Deletion

Here we list all existing keys in sagacli (default os keyring) to check that the key named test1 has actually been deleted.

Further Details

To get a full list of options on the keys delete command, type

Last updated