0

Till now when I upgrade the chaincode I just increment the version and sequence of the new chaincode package but I was wondering if there is a way to clean up old chaincode by deleting it so that the unwanted chaincode no longer uses up system resources. Hyperledger chaincode list

JonasLevin
  • 1,592
  • 1
  • 20
  • 50
  • Do you have permission and method to access the system where chaincode is installed? If your chaincode is generally configured and is running based on a docker container, artificially delete unused docker chaincode containers and images in the system. – myeongkil kim Feb 08 '21 at 14:46
  • I run it locally in a VM. I did delete all the chaincode images with `docker rmi` but they still appear in the chaincode option of Explorer. – JonasLevin Feb 08 '21 at 15:17
  • 1
    If you have already cleaned up the images and containers, the system resources are not already being used. This information is the history of the chaincode recorded on the fabric. – myeongkil kim Feb 09 '21 at 13:14

1 Answers1

0

This is an open issue in the Hyperledger Fabric community and likely scheduled for a future release. There is a JIRA issue with BACKLOG status at this time: FAB-5781

Meanwhile all you can do is follow the instructions in another Stackoverflow comment.

You basically remove the chaincode container and delete the chaincode files within the peer container.

Sigmatics
  • 615
  • 4
  • 17