def action_docker_clean(self, args):
        """
            Cleans all docker images used to create experiments
        """
        potential_images = []
        for name, settings in self.config.creation_settings.items():
            if settings.mode == 'basic':
                if 'agent' in settings and 'image' in settings.agent:
                    potential_images.append(settings.agent.image)
                if 'nonagent' in settings and 'image' in settings.nonagent:
                    potential_images.append(settings.nonagent.image)
            else:
                raise ValueError('Unsupported creation setting mode {}'
                                 .format(settings.mode) + ' for creation'
                                 + ' setting ' + name)

        potential_images = list(set(potential_images))
        potential_images = [x for x in potential_images if ':' not in x]
        images_to_clean = ['{}:*'.format(x) for x in potential_images]
        clean_images(images_to_clean)

            Cleans all docker images used to create experiments
        
surreal/kube/surreal_kube.py