4

How to completely erase all the data from local EOS instance?

After shutting down nodeos and deleting all the files from both ~/Library/Application Support/eosio/nodeos/data and $HOME/eosio-wallet, it's still possible to query wallet data.

cleos wallet list

shows:

Wallets: [ "default" ]

Related issue on Github.

1
  • to be sure that you're looking at the correct eos-wallet directory, try: cleos wallet open -n boguswalletname. The error message should show a path where it looked for the wallet file.
    – Vlad
    May 14 '18 at 16:33
4

To reset your chain data on a local testnet you should:

  • Stop your node
  • Delete the blocks and shared_mem folders which you can find under:
    • Linux: ~/.local/share/eosio/nodeos/data
    • Mac OS: ~/Library/Application Support/eosio/nodeos/data

Deleting the wallets and imported keys information is a separate and independent step (you don't need to reset your chain, you can just delete the wallet data and you can delete individual wallet files too).

One way to confirm you're looking at the correct wallets directory is to do:

cleos wallet open -n boguswalletname

This should result in something like: Error 3140002: Nonexistent wallet Are you sure you typed the wallet name correctly? Error Details: Unable to open file: /Users/yourusername/eosio-wallet/./boguswalletname.wallet

0

I'm facing this problem as well and solved it by reopening the local blockchain as follows (--hard-replay is the key to avoid err when restarting):

pkill keosd
pkill nodeos 
keosd &
nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::chain_api_plugin --plugin eosio::http_plugin -d /path/to/eos/contracts/eosio/data --config-dir /path/to/eos/contracts/eosio/config --access-control-allow-origin=* --hard-replay --contracts-console --http-validate-host=false —filter-on=‘*’ >> nodeos.log 2>&1 & 
rm -rf ~/eosio-wallet/default.wallet

After this, all wallet and account data will be deleted :D Hope it helps:)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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