def clean(i):

    o=i.get('out','')

    to_delete=True
    if o=='con' and i.get('force','')!='yes':
       r=ck.inp({'text':'Are you sure to clean the whole index (y/N): '})
       c=r['string'].lower()
       if c!='y' and c!='yes': to_delete=False

    if to_delete:
       r=ck.access_index_server({'request':'DELETE', 'path':'/_all', 'dict':{}})
       if r['return']>0: return r
       dd=r['dict']

       status=dd.get('status',0)
       err=dd.get('error','')

       if err!='': r={'return':1, 'error':err}

    return r
Input:  {
dataset/ETHPy150Open ctuning/ck/ck/repo/module/index/module.py/clean