Removing unused images

Use this procedure to identify and remove unused Control Center images.
  1. Log in to the master host as root, or as a user with superuser privileges.
  2. Identify the images associated with the installed version of serviced.
    serviced version | grep Images
    Example result:
    IsvcsImages: [zenoss/serviced-isvcs:v56 zenoss/isvcs-zookeeper:v8]
  3. Display the serviced images in the local repository.
    docker images | awk '/REPO|isvcs/'
    Example result (edited to fit):
    REPOSITORY                     TAG       IMAGE ID
    zenoss/serviced-isvcs          v40       88cd6c24cc82
    zenoss/serviced-isvcs          v56       0aab5a2123f2
    zenoss/isvcs-zookeeper         v3        46fa0a2fc4bf
    zenoss/isvcs-zookeeper         v8        0ff3b3117fb8

    The example result shows the current versions and one set of previous versions. Your result may include additional previous versions and will show different images IDs.

  4. Remove unused images.
    Replace Image-ID with the image ID of an image for a previous version.
    docker rmi Image-ID
    Repeat this command for each unused image.