When you delete an image manifest from the DigitalOcean Container Registry (DOCR), it may leave layer data that is no longer referenced by any manifest in your registry. These unused layers occupy space in your registry. You can check the amount of space being used in your registry in the control panel. Use garbage collection to clean up the unused image layers and free up storage in your registry.
garbage-collection command to start garbage collection on your container registry:
doctl registry garbage-collection start [<your-registry-name>]
The command initiates garbage collection and warns you that the registry will be put into read-only mode. The garbage collection starts once you confirm to proceed. The command also provides the UUID of the garbage collection.
To retrieve information about the currently-running garbage collection, run the following command:
doctl registry garbage-collection get-active [<your-registry-name>]
To cancel any currently-active garbage collections for your registry, run the following command:
doctl registry garbage-collection cancel [<your-registry-name>] <gc-uuid>
If you want to see all the garbage collections that you have run on a registry, run the following command:
doctl registry garbage-collection list [<your-registry-name>]