Removing container image via build pipeline

My build pipeline fails while creating the container image as the storage quota exceeded. It is a pain to manually delete old images from the registry. Is there an option to limit the images and delete old ones automatically or as part of build stage?

FAILED Status: unauthorized: You have exceeded your storage quota. Delete one or more images, or review your storage quota and pricing plan. For more information, see https://ibm.biz/BdjFwL, Code: 1