eradicate
Removes commented-out code.
Decision gist · record as of 2026-08-14
Yes. Eradicate is a lightweight, actively maintained tool with zero dependencies, permissive licensing, and a clear single purpose. It's useful for teams that want to enforce clean code practices and remove commented-out code at scale. Install it if you maintain Python codebases and want to automate comment cleanup; the low friction and focused scope make it a low-risk addition to your workflow.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- Actively maintained as of 2025-10-27 with recent commits and a stable repository.
License · maintenance · safety
Expat License (permissive) — Licensed under the Expat License (MIT equivalent), a permissive license that allows free use, modification, and distribution with minimal restrictions.
last release 2025-10-27 (291 days) · last repo commit 2026-07-21 · 220 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 972,232 downloads/mo, #4,608 on PyPI
Alternatives
Verify before relying
pip install eradicate
eradicate --in-place example.py- Accuracy of heuristics for distinguishing commented code from legitimate comments in edge cases
- Performance characteristics on large codebases or files with many comments
What it is and what it does
Eradicate is a command-line tool that scans Python source files for block comments containing valid Python syntax and removes those likely to be commented-out code. It uses heuristics to avoid false positives—for example, it won't remove comments that are natural language sentences. The tool is designed for teams using modern version control who want to clean up accumulated commented-out code without manually reviewing each instance.
The package works by analyzing comment blocks for Python syntax patterns and filtering out obvious non-code comments. It includes a whitelist feature to handle false positives by allowing users to specify regex patterns (via --whitelist or --whitelist-extend) that should be preserved. It integrates with linting workflows and has companion plugins for flake8 and other tools.
Use it for
- Clean up legacy codebases that accumulated commented-out code over time before committing to version control
- Enforce code cleanliness in CI/CD pipelines by detecting and removing dead comments automatically
- Prepare code for code review by removing noise and improving readability of comment sections
- Integrate with pre-commit hooks to prevent commented-out code from entering the repository
- Audit existing Python projects to identify and remove debugging or experimental code left as comments
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Eradicate is a lightweight, actively maintained tool with zero dependencies, permissive licensing, and a clear single purpose. It's useful for teams that want to enforce clean code practices and remove commented-out code at scale. Install it if you maintain Python codebases and want to automate comment cleanup; the low friction and focused scope make it a low-risk addition to your workflow.
Install
eradicate on PyPI
Before you install
Low install friction with no runtime dependencies. Actively maintained as of 2025-10-27 with recent commits and a stable repository.
License in practice
Licensed under the Expat License (MIT equivalent), a permissive license that allows free use, modification, and distribution with minimal restrictions.
Quickstart
pip install eradicate
eradicate --in-place example.py
Verify before relying
- Accuracy of heuristics for distinguishing commented code from legitimate comments in edge cases
- Performance characteristics on large codebases or files with many comments
Package facts
| License | Expat License permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 291 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 972,232 / month, #4,608 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Software Development :: Quality Assurance |
Evidence: eradicate-3.0.1-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 › “clean up commented-out code”
- eradicateEradicate detects and removes commented-out code from Python files…
- deadcodeScans Python codebases to find and optionally remove unused…
- flake8-eradicateA flake8 plugin that detects commented-out code in Python files and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Quality Assurance packages
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
Ruff is a Python linter and code formatter written in Rust that combines linting, formatting, and code fixing into a single tool, replacing Flake8, Black, isort, and related utilities.
Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.
Black reformats Python source code to a consistent style by parsing entire files and rewriting them according to an opinionated, deterministic set of rules, eliminating manual formatting decisions.
pytest-xdist distributes pytest tests across multiple CPU cores or machines to speed up test execution, with the simplest usage being `pytest -n auto` to spawn workers equal to available CPUs.
Install it if your test suite takes long enough that parallelization would save meaningful time.
Validates AWS CloudFormation templates in YAML or JSON format against resource provider schemas and best practices, checking property values and configuration correctness.
Install it if you work with CloudFormation templates.
See also flake8-eradicate · vulture · uncalled · deadcode · yesqa · sanitize-filename · comment-parser · commented-configparser · autoflake · pathvalidate