def is_event_relevant(event, installed_pkgs, tasks):
    """Determine if event is applicable given the installed packages and tasks planned so far."""
    for package in event.in_pkgs.keys():
        if package in tasks['to_remove']:
            return False
        if package not in installed_pkgs and package not in tasks['to_install']:
            return False
    return True