Unregister a file from the package database

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()