def METHOD_NAME(manager: Manager, options):
    forget_name = options.forget_value
    if is_imdb_url(forget_name):
        imdb_id = extract_id(forget_name)
        if imdb_id:
            forget_name = imdb_id
    tasks = None
    if options.task:
        tasks = []
        for task in options.task:
            try:
                tasks.extend(m for m in manager.matching_tasks(task) if m not in tasks)
            except ValueError as e:
                console(e)
                continue
        if not tasks:
            console('None of the specified tasks exist.')
            return
    # If tasks are specified it should use pattern matching as search
    if tasks:
        forget_name = forget_name.replace("%", "\\%").replace("_", "\\_")
        forget_name = forget_name.replace("*", "%").replace("?", "_")
    count, fcount = db.forget(forget_name, tasks=tasks, test=options.test)
    console(f'Removed {count} titles ({fcount} fields)')
    manager.config_changed()