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:v61 zenoss/isvcs-zookeeper:v10]
  3. Start Docker, if necessary.
    systemctl status docker || systemctl start docker
  4. 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          v61       0aab5a2123f2
    zenoss/isvcs-zookeeper         v3        46fa0a2fc4bf
    zenoss/isvcs-zookeeper         v10       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.

  5. 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.