Hyperledger Fabric: How to delete installed chaincode ?

+1 vote
Hi.. I installed and created a chaincode but i need to change it because it had something wrong in it. I can create another chaincode with different names but I dont want to do that. I want to delete this and create chaincode with the same name. How can I do it?
Nov 19, 2018 in Blockchain by slayer
• 29,040 points
497 views

3 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+1 vote
Best answer

One way to do it, that I usually do when I face such problem is by killing and removing the container. You can try this:

docker stop $(docker ps -aq) && docker rm $(docker ps -aq)
answered Nov 19, 2018 by Omkar
• 65,820 points

selected May 6 by slayer
+1 vote

The Blockchain data is stored in the /var/hyperledger/production/db directory. So deleting the files in this directory should delete the chaincode. Use the following commands:

$ cd /var/hyperledger/production/db
$ rm - rf *
answered May 6 by Rishi
0 votes

The chaincode will be deleted if you remove the container. You can do it like this:

$ docker stop <container id>
$ docker rm <container id>
answered May 6 by Kumar

Related Questions In Blockchain

+1 vote
2 answers

How to return value from a chaincode in Hyperledger Fabric?

Hyperledger Fabric supports only 2 types of ...READ MORE

answered Jun 13, 2018 in Blockchain by Perry
• 16,450 points
591 views
0 votes
1 answer

How to set chaincode path in Hyperledger Fabric?

For chaincode to properly run on your ...READ MORE

answered Jul 27, 2018 in Blockchain by digger
• 27,620 points
324 views
0 votes
1 answer
+2 votes
3 answers
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.