def req_remove(requirements, remove_str):
    """
    remove any line from requirements containing remove_str
    :param requirements (list of strings): each string a package install requirement (e.g. 'flake8==3.7.9')
    :param remove_str (str): string pattern
    :return: updated list of requirements
    """
    new_req = []
    for req in requirements:
        if remove_str not in req:
            new_req.append(req)
    return new_req