--- id: nbstripout version: "0.9.1" license: MIT license_treatment: permissive maintenance: active --- # nbstripout — Strips outputs from Jupyter and IPython notebooks License: permissive · Maintenance: active · Downloads: 1.9M/mo ## What it is and what it does nbstripout is a command-line tool that removes output cells and selected metadata from Jupyter and IPython notebooks. It reads a notebook file (or stdin), strips execution results and some metadata, and writes the cleaned version back to the original file or stdout. The tool is designed to be used as a Git filter or pre-commit hook, allowing developers to keep notebook output on disk while preventing it from being committed to version control. This reduces repository size and minimizes diffs when notebooks are re-executed. The package supports multiple notebook formats including standard Jupyter notebooks (.ipynb) and Zeppelin notebooks (.zpln). It offers both direct file processing and integration with Git workflows through filter installation commands. It can operate on single files, multiple files, or recursively on directories, and includes dry-run and verification modes to preview changes before applying them. Use it for: - Set up a Git filter to automatically strip notebook output before commits, keeping repositories clean without manual intervention. - Use as a pre-commit hook in a data science project to ensure notebooks are committed without execution artifacts. - Retroactively clean output from existing notebooks in a repository using git filter-repo integration. - Process notebooks in a CI/CD pipeline to verify they can be stripped without errors before merging. - Strip output from notebooks before sharing them in pull requests to reduce diff noise and file size. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Strips output cells and metadata from Jupyter and IPython notebooks, typically for use as a Git filter to keep notebooks clean in version control without losing local output. Yes. This is a stable, actively maintained tool with low install friction and a single lightweight dependency. It solves a real problem for teams using Jupyter notebooks in Git workflows. The MIT license is permissive, there are no known vulnerabilities, and the package is in the top 5000 by download volume. Install it if you work with notebooks in version control. ## Install pip install nbstripout uv add nbstripout poetry add nbstripout ## Installing nbstripout Before you install: Low friction: single runtime dependency (nbformat), pure Python wheel, and actively maintained with a recent release. Requires Python 3.10 or later. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions. Quickstart: pip install nbstripout nbstripout notebook.ipynb # Or set up as a Git filter: nbstripout --install Requires Python 3.10 or later; nbformat must be installed as a runtime dependency. Verify before relying: - Whether the package handles all notebook formats (Zeppelin, standard Jupyter) equally well in practice. - Performance characteristics when processing large notebooks or many files in a repository. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags jupyter notebook output removal, strip jupyter cell output, git filter jupyter notebooks, clean ipython notebook, notebook version control, jupyter pre-commit hook, remove notebook execution results, jupyter, git-integration, notebook-tools [View on SkillFed](https://skillfed.io/packages/nbstripout) · [View on PyPI](https://pypi.org/project/nbstripout/)