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,050 points
752 views

3 answers to this question.

+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
• 67,200 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
• 17,010 points
702 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
421 views
0 votes
1 answer
+2 votes
3 answers
0 votes
1 answer