Is it possible to remove a key from an EOS wallet? I am looking to create a key that will be used for a one off operation that I can then destroy so that the operation cannot be undone. In this particular case, I want to use the key to create an account that will deploy a smart contract, then destroy the key so that the contract cannot ever be replaced or modified.

Does cleos or the wallet_plugin provide a method for removing/deleting a key that has been placed in the wallet?

3 Answers 3


The following command removes a keypair from an opened, unlocked wallet:

cleos wallet remove_key -n wallet_name --password passwd public_key

where wallet_name is the name of your wallet, passwd is your wallet password given to you by the "wallet create" command, and public_key is the public key of the key pair you'd like to remove from the wallet.

If you also want to remove the custom wallet data dir, you should consider using the shred command to overwrite the files first.


Can't you run keosd with --data-dir=/path/to/onetime-wallet and then create the wallet keypair and use it. Once done, kill keosd and remove the custom wallet data dir?

  • I've considered something like that, but using the cleos wallet create command instead. But that seems wrong to me. If it's my wallet, why can't I manage the keys in it? Jun 29, 2018 at 19:30

The following command removes a keypair from an opened, unlocked wallet.

cleos [OPTIONS] wallet remove key EOSy59834ut9384htno9834.....

you'll then have to put in the password for the wallet.

To destroy it as much as you can remove the custom wallet data dir as said by Kabir.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.