def env_get_outdated(app, env, added, changed, removed):
    """Run during Sphinx `env-get-outdated` phase.

    Remove the items listed in `docs_to_remove` from known pages.
    """
    to_remove = set()
    if hasattr(env, 'found_docs'):
        for doc in env.found_docs:
            if _to_be_removed(doc):
                to_remove.add(doc)
    added.difference_update(to_remove)
    changed.difference_update(to_remove)
    removed.update(to_remove)
    if hasattr(env, 'project'):
        env.project.docnames.difference_update(to_remove)
    return []
Run during Sphinx `env-get-outdated` phase.

    Remove the items listed in `docs_to_remove` from known pages.
    
docs/conf.py