Friends. I did a stupid thing here and need your help. I just want to delete the accounts, so I delete everything in datadir, the datadir is the directory which is used in the command below:

./geth --datadir ethereum init genesis.json

After deleting, I run the command ./geth --datadir ethereum init genesis.json

> eth.accounts

but when I run command below:

superman@ubuntu:~/data/src/github.com/ethereum/go-ethereum$ ./geth account list
Account #0: {9aed02c60c71ea53e7d34f52c624ab060b467b84} keystore:///home/superman/.ethereum/keystore/UTC--2017-06-16T02-26-03.490121281Z--9aed02c60c71ea53e7d34f52c624ab060b467b84
Account #1: {acf3e3d535903e8ddeefc25cfc9a9fcec74cf60f} keystore:///home/superman/.ethereum/keystore/UTC--2017-07-20T03-04-30.295140884Z--acf3e3d535903e8ddeefc25cfc9a9fcec74cf60f

why it shows 2 accounts but there is only 1 account in geth console? And there are not same? how to solve the problem?

1 Answer 1


You're using the --datadir ethereum in the first two commands, but not in the last one. The last command uses the default --datadir of .ethereum. Thus, you see the keystore's location is /home/superman/.ethereum. There must be two accounts in the /home/superman/.ethereum directory. If you want to use the ethereum directory for storing data, the last command should be

./geth --datadir ethereum account list

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.