<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def unregister_file(path, pkg=None, conn=None):  # pylint: disable=W0612
    '''
    Unregister a file from the package database
    '''
    close = False
    if conn is None:
        close = True
        conn = init()

    conn.execute('DELETE FROM files WHERE path=?', (path, ))
    if close:
        conn.close()