I am running private ethereum blockchain using ethereum and now I want to reset the chain and delete all the contracts, transactions and logs and restart everything from block 0.

What is the best way to do that?

1 Answer 1


Run the private ethereum chain in a docker container... and then you can throw the container or its data and deploy it again in a matter of seconds those are some examples of how to run a private chain with a docker




  • 1
    Thanks for your reply! I will install my new chain in docker container but how can I remove my existing chain?
    – Ruchita
    Commented Jun 29, 2020 at 10:09
  • @Ruchita what is the command you used to start geth? usually in the command, you write the Path (datadir) of where your blockchain data should be saved. like this: geth --datadir="/tmp/eth/60/01" -verbosity 6 --ipcdisable --port 30301
    – Majd TL
    Commented Jun 29, 2020 at 10:51
  • geth --datadir ~/chaindata/ --networkid 12345 --verbosity 3 --rpc --port 30304 --rpcport 8545 --rpcaddr "<private IP>" --rpccorsdomain "http://<private IP>:8080, http://<private IP>:8000" --rpcapi "web3,eth,personal,net" --preload "/home/ubuntu/scripts/mineWhenNeeded.js" --nodiscover --gcmode archive --allow-insecure-unlock > ~/myLogs/bcLogs.out 2>&1 &
    – Ruchita
    Commented Jun 29, 2020 at 12:35
  • if you look for the folder "ChainData" then you will find 2 folders inside it, if you delete them then everything will be removed and you will start again from block 0. that is what I remember from last time using geth local 2 years ago :) @Ruchita
    – Majd TL
    Commented Jun 29, 2020 at 12:41

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.