21

I have several accounts I've created in the Geth console using:

personal.newAccount()

I no longer use (nor have any intention of using) the first couple of accounts I created, meaning whenever I reference an active account I have to set the account array index to something other than 0.

How do I remove the unused accounts so I can just reference my active account using eth.accounts[0]?

1
  • I cannot access the keystore files on Ubuntu. When I type $ geth account list it gives me a list of accounts and the directory of these keystore files but I cannot find this folder anywhere on this machine. Can someone please help and tell me how to access the keystore files? I am new to linux and feel that it has to do with permissions.. Jun 24, 2017 at 1:39

2 Answers 2

20

You can't remove account. You need to remove them directly from your keystore folder.

IT IS IRREVERSIBLE.

~/Library/Ethereum/keystore

I feel the need to repeat that once the file is deleted it's Game over.

5
  • 1
    This removes the reference to those accounts in eth.accounts, but how does eth.coinbase get updated? (It's now pointing to one of the deleted accounts.) Feb 12, 2016 at 19:21
  • next account in line should become eth.accounts[0]. What do you get ?
    – jayD
    Feb 12, 2016 at 19:36
  • Yep, correct - the accounts entries have shuffled up, which is great. But the eth.coinbase variable hasn't updated and now points to the original account[0], which was deleted, and not the new one. Feb 12, 2016 at 19:39
  • 1
    Are you trying to mine ? geth -mine --etherbase "youraccountaddress". Also you might want to try geth account update "address"
    – jayD
    Feb 12, 2016 at 19:40
  • 1
    Not on this box, but I wanted to know for future reference. I've found the command required for setting it: web3.miner.setEtherbase(web3.eth.accounts[0]) Feb 12, 2016 at 19:42
2

for testnet it's in ~/Library/Ethereum/testnet/keystore

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.