Comment on page
To delete a key from
sagacli, you can use the key delete command in the following manner:
sagacli keys delete <keyname>
IMPORTANT:: Please bear in mind that before you delete a key, you should ensure that
- 1.There are no assets i.e. chainlets associated to the address belonging to the key being deleted. If there are any assets, you will not be able to transact with these assets as those transactions would require signatures provided by the key.
- 2.The address associated with the key does not have an escrow balance. If the balance exists, you can only withdraw this balance if you have a way to regenerate the key being deleted.
- 3.Most importantly, you should ensure that you have a way to regenecrate the key i.e. you have the mnemonic phrase used to create the key. Without this mnemonic, the key cannot be regenerated once deleted.
In the following example, we have a key called
testthat we'd like to delete from
Here are the details of the key indicating that it is present in
$ sagacli keys show test1
- address: saga1z0uscdcprxcun2mlnyrz5kelemmjw768sdrgz5
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
sagacli keys delete <keyname> -y
To delete with confirmation:
$ sagacli keys delete test1
Key reference will be deleted. Continue? [y/N]: y
Key deleted forever (uh oh!)
Here we list all existing keys in
oskeyring) to check that the key named
test1has actually been deleted.
$ sagacli keys list
- address: saga14hyhswxf0shnpzup406yvjejmfsrjnvzq897re
- address: saga1tkax73wxs047nc8kaalhfc4ar6gay2sde28crx
To get a full list of options on the keys delete command, type
sagacli keys delete --help