

def vacuum(verbose=False):
    "\n    Remove unused images\n\n    verbose : boolean (False)\n        toggle verbose output\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' imgadm.vacuum [verbose=True]\n    "
    ret = {
        
    }
    imgadm = _check_imgadm()
    cmd = '{0} vacuum -f'.format(imgadm)
    res = __salt__['cmd.run_all'](cmd)
    retcode = res['retcode']
    if (retcode != 0):
        ret['Error'] = _exit_status(retcode)
        return ret
    result = {
        
    }
    for image in res['stdout'].splitlines():
        image = [var for var in image.split(' ') if var]
        result[image[2]] = {
            'name': image[3][1:image[3].index('@')],
            'version': image[3][(image[3].index('@') + 1):(- 1)],
        }
    if verbose:
        return result
    else:
        return list(result.keys())

dataset/ETHPy150Open saltstack/salt/salt/modules/smartos_imgadm.py vacuum/original