Where does hyperledger fabric store the database for the blockchain

+1 vote

Hi. I need to know where the Hyperledger fabric stores the database of the Blockchain. I am trying to develop a new chaincode and so I want to clean up the existing Blockchain. I am working on Ubuntu machine and want to delete the relevant files of Hyperledger fabric. So can you tell me where the files of Hyperledger is stored? 

Jul 6, 2018 in Blockchain by charlie_brown
• 7,720 points

recategorized Jul 7, 2018 by Vardhan 2,877 views

4 answers to this question.

+1 vote
Best answer

The data of the Hyperledger Blockchain is stored in folder /var/hyperledger/production/db. Go to this directory:

$ cd /var/hyperledger/production/db

and then remove all the files in it:

$ rm -rf *
answered Apr 29, 2019 by Tina

selected Apr 29, 2019 by Omkar
+1 vote

If you want to delete the installed chaincode, then you can use Docker to delete it. Try this command:

docker stop $(docker ps -aq) && docker rm $(docker ps -aq)
answered Apr 29, 2019 by Rishi
0 votes

You can also try restarting the docker. It will clear the Blockchain. 

$ docker restart
answered Apr 29, 2019 by Kamal
0 votes

Try 

$ chaincode stop
answered Apr 29, 2019 by Dinesh
Hey @Dinesh. This might stop the chaincode but the requirement is to clear the files.

Related Questions In Blockchain

0 votes
1 answer

Where does Hyperledger Fabric store the database for the Blockchain?

The Hyperledger Fabric stores the database in ...READ MORE

answered Jul 13, 2018 in Blockchain by Perry
• 17,100 points
2,357 views
0 votes
1 answer
0 votes
1 answer

Where does Hyperledger fabric store the public key and private key of the user?

It signs the transaction (eg. initiated by ...READ MORE

answered Mar 24, 2022 in Blockchain by Rahul
• 9,680 points
608 views
0 votes
1 answer
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,451 views
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 26,740 points
1,003 views
+1 vote
1 answer
0 votes
1 answer

Where does Hyperledger fabric store the public key and private key of the user?

It signs the transaction with its private key ...READ MORE

answered Apr 11, 2022 in Blockchain by Rahul
• 9,680 points
882 views
0 votes
1 answer

How blocks are linked in the Hyperledger Fabric blockchain?

The structure of block in Hyperledger Fabric ...READ MORE

answered Jul 3, 2018 in Blockchain by Omkar
• 69,220 points
1,575 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP