@log_repo_action<EOL>def delete(repo, args=[]):
<EOL>result = generic_repo_cmd(repo, '<STR_LIT>', args)<EOL>if result['<STR_LIT:status>'] != '<STR_LIT:success>': <EOL><INDENT>return status <EOL><DEDENT>with cd(repo.rootdir): <EOL><INDENT>package = repo.package <EOL>resources = package['<STR_LIT>'] <EOL>cleaned_resources = []<EOL>for r in resources: <EOL><INDENT>relativepath = r['<STR_LIT>'] <EOL>sha256 = r['<STR_LIT>'] <EOL>if relativepath not in ['<STR_LIT>', None]: <EOL><INDENT>if not os.path.exists(relativepath): <EOL><INDENT>print("<STR_LIT>", relativepath) <EOL>continue <EOL><DEDENT><DEDENT>cleaned_resources.append(r) <EOL><DEDENT>package['<STR_LIT>'] = cleaned_resources <EOL>repo.package = package <EOL>with open('<STR_LIT>', '<STR_LIT:w>') as fd: <EOL><INDENT>fd.write(json.dumps(repo.package, indent=<NUM_LIT:4>))<EOL><DEDENT>return {<EOL>'<STR_LIT:status>': '<STR_LIT:success>',<EOL>'<STR_LIT:message>': '<STR_LIT>'<EOL>}<EOL><DEDENT>
Delete files

Parameters
----------

repo: Repository object
args: Arguments to git command