'Removes stopped service containers.
By default, anonymous volumes attached to containers will not be removed. You
can override this with `-v`. To list all volumes, use `docker volume ls`.
Any data which is not in a volume will be lost.
Usage: rm [options] [SERVICE...]
Options:
-f, --force   Don\'t ask to confirm removal
-s, --stop    Stop the containers, if required, before removing
-v            Remove any anonymous volumes attached to containers
-a, --all     Deprecated - no effect.'

def rm(self, options):

    if options.get(u'--all'):
        log.warn(u'--all    flag    is    obsolete.    This    is    now    the    default    behavior    of    `docker-compose    rm`')
    one_off = OneOffFilter.include
    if options.get(u'--stop'):
        self.project.stop(service_names=options[u'SERVICE'], one_off=one_off)
    all_containers = self.project.containers(service_names=options[u'SERVICE'], stopped=True, one_off=one_off)
    stopped_containers = [c for c in all_containers if (not c.is_running)]
    if (len(stopped_containers) > 0):
        print(u'Going    to    remove', list_containers(stopped_containers))
        if (options.get(u'--force') or yesno(u'Are    you    sure?    [yN]    ', default=False)):
            self.project.remove_stopped(service_names=options[u'SERVICE'], v=options.get(u'-v', False), one_off=one_off)
    else:
        print(u'No    stopped    containers')
