sphinx-remove-toctrees
Reduce your documentation build size by selectively removing toctrees from pages.
Decision gist · record as of 2026-08-14
Yes, if you maintain Sphinx documentation with large auto-generated API sections and experience slow builds. The extension is straightforward to configure, has no complex dependencies, and solves a specific performance problem. The dormant maintenance status is acceptable for a focused, stable tool—no active vulnerabilities and it supports current Python versions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with only sphinx as a runtime dependency.
- Maintenance is dormant—last release was 875 days ago, though the repository remains active and unarchived.
License · maintenance · safety
permissive license (permissive) — MIT License permits unrestricted use, modification, and distribution with minimal restrictions, making it safe for both open-source and commercial projects.
last release 2024-03-22 (875 days) · last repo commit 2024-03-22 · 15 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 147,888 downloads/mo, #11,050 on PyPI
Alternatives
Verify before relying
pip install sphinx-remove-toctrees
In conf.py:
extensions.append("sphinx_remove_toctrees")
remove_from_toctrees = ["api/generated/*", "subfolder/page_two.rst"]- Performance improvement magnitude for typical documentation projects with large API docs
- Compatibility with specific Sphinx themes beyond those mentioned in the description
What it is and what it does
sphinx-remove-toctrees is a Sphinx extension that speeds up documentation builds by removing toctree objects from pages you specify. It works by intercepting Sphinx's build process after the initial validation phase but before HTML rendering, selectively deleting toctree entries that match glob-like patterns you configure in conf.py. This is most useful when your documentation uses autosummary to generate many stub pages—each one adds overhead to the build, especially in themes that render the entire table of contents on every page.
You configure it by adding a list of glob patterns to a `remove_from_toctrees` key in conf.py, specifying which pages should be removed from the sidebar. The extension ensures no warnings are raised about missing files while still removing them from the rendered navigation, avoiding the link-resolution overhead that slows large builds.
Use it for
- Speed up Sphinx builds for projects with auto-generated API documentation using autosummary
- Remove stub pages from sidebar navigation without triggering missing-file warnings
- Optimize documentation rendering for themes with collapsible sidebar sections
- Reduce build time for large nested documentation hierarchies
- Selectively hide generated API pages from table of contents while keeping them accessible
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you maintain Sphinx documentation with large auto-generated API sections and experience slow builds.
The extension is straightforward to configure, has no complex dependencies, and solves a specific performance problem. The dormant maintenance status is acceptable for a focused, stable tool—no active vulnerabilities and it supports current Python versions.
Install
sphinx-remove-toctrees on PyPI
Before you install
Low friction: pure Python wheel with only sphinx as a runtime dependency. Maintenance is dormant—last release was 875 days ago, though the repository remains active and unarchived.
License in practice
MIT License permits unrestricted use, modification, and distribution with minimal restrictions, making it safe for both open-source and commercial projects.
Quickstart
pip install sphinx-remove-toctrees
In conf.py:
extensions.append("sphinx_remove_toctrees")
remove_from_toctrees = ["api/generated/*", "subfolder/page_two.rst"]
Verify before relying
- Performance improvement magnitude for typical documentation projects with large API docs
- Compatibility with specific Sphinx themes beyond those mentioned in the description
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagesphinx |
| Maintenance | Dormant 875 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 147,888 / month, #11,050 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9 |
Evidence: sphinx_remove_toctrees-1.0.0.post1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sphinx build performance optimization”
- sphinx-remove-toctreesA Sphinx extension that selectively removes toctree objects from…
- exhaleExhale automatically generates C++ API documentation by running…
- moocoreProvides fast implementations of core algorithms for multi-objective…
Give your agent the search over MCP, or paste the wish link into any chat.
More Sphinx packages
Parses Python docstrings in ReST, Google, Numpydoc, and Epydoc formats, extracting structured information like descriptions, parameters, return types, and exceptions.
Install it if you need to programmatically read and extract structured data from Python docstrings.
Sphinx generates professional documentation from reStructuredText source files, producing HTML, PDF, EPUB, and other formats with automatic cross-references, code highlighting, and hierarchical navigation.
A Sphinx extension that outputs documentation in serialized HTML formats (JSON and pickle) alongside standard HTML.
Alabaster is a clean, responsive Sphinx theme for documentation that requires Python 3.10 or newer and Sphinx 6.2 or newer.
A Sphinx extension that generates HTML help files from reStructuredText documentation source.
A Sphinx extension that converts documentation source files into QtHelp format, enabling integration with Qt-based help systems and documentation viewers.
However, be aware that maintenance is dormant—if you rely on it long-term, monitor Sphinx compatibility and consider whether QtHelp remains the right format for your…
See also sphinx_external_toc · sphinx-multitoc-numbering · sphinx-reredirects · sphinx-autosummary-accessors · sphinxext-rediraffe · sphinx-jupyterbook-latex · sphinx-simplepdf · sphinx-last-updated-by-git · autodocsumm · sphinx-togglebutton