$npx skillfedfor your agent

autoflake

Removes unused imports and unused variables

Worth itPyPI Quality AssuranceReleased Feb 20266.5M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — autoflake-2.3.3-py3-none-any.whl
v2.3.3 · released 2026-02-20 · Python >=3.10 · 2 runtime deps: pyflakes, tomli

Yes. autoflake is a lightweight, actively maintained tool with no security vulnerabilities, minimal dependencies, and a permissive MIT license. It solves a real code-quality problem with low friction and is well-suited for both individual developers and teams integrating it into CI/CD workflows.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python >=3.10.
  • Low install friction with only 2 runtime dependencies (pyflakes and tomli).
  • The project is actively maintained with a recent release on 2026-02-20 and steady commit activity.

License · maintenance · safety

MIT (permissive) — MIT license is permissive, allowing use in commercial and private projects with minimal restrictions.

last release 2026-02-20 (175 days) · last repo commit 2026-07-30 · 953 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,494,194 downloads/mo, #1,900 on PyPI

Verify before relying

pip install autoflake

autoflake --in-place --remove-unused-variables example.py
  • Whether the tool safely handles imports with side effects beyond the documented --imports and # noqa mechanisms.
  • Performance characteristics when processing large codebases or using parallel jobs (-j flag).
Same gist for agents: .md · .json

What it is and what it does

autoflake is a command-line tool that automatically detects and removes unused imports and variables from Python source files. It uses pyflakes to identify dead code and by default only removes unused imports from the standard library, leaving third-party imports untouched unless explicitly configured. This conservative default prevents accidental removal of imports that may have side effects.

The tool is typically used as a standalone formatter or integrated into pre-commit hooks to enforce code cleanliness. It supports configuration via pyproject.toml or setup.cfg, can operate on single files or recursively through directories, and offers fine-grained control over what gets removed—from all unused imports to unused variables to duplicate dictionary keys. It also removes useless pass statements by default.

Use it for

  • Run as a pre-commit hook to automatically clean up unused imports before code review.
  • Integrate into CI/CD pipelines to check for unused code and fail builds when cleanup is needed.
  • Refactor legacy Python codebases to remove accumulated dead imports and variables.
  • Configure with --imports to safely remove unused third-party imports in specific projects.
  • Use --expand-star-imports to replace wildcard imports with explicit names for clarity.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

autoflake is a lightweight, actively maintained tool with no security vulnerabilities, minimal dependencies, and a permissive MIT license. It solves a real code-quality problem with low friction and is well-suited for both individual developers and teams integrating it into CI/CD workflows.

Install

autoflake on PyPI

Before you install

Low install friction with only 2 runtime dependencies (pyflakes and tomli). The project is actively maintained with a recent release on 2026-02-20 and steady commit activity.

Requires Python >=3.10.

License in practice

MIT license is permissive, allowing use in commercial and private projects with minimal restrictions.

Quickstart

pip install autoflake

autoflake --in-place --remove-unused-variables example.py

Verify before relying

  • Whether the tool safely handles imports with side effects beyond the documented --imports and # noqa mechanisms.
  • Performance characteristics when processing large codebases or using parallel jobs (-j flag).

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
pyflakestomli
MaintenanceActively maintained 175 days since the last release
Last repo commit
First released
Downloads6,494,194 / month, #1,900 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone 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: autoflake-2.3.3-py3-none-any.whl

Tags

Capabilities
remove unused imports pythonclean up unused variablespython code cleanup toolautomate import removalunused code detectionpython linting automationcode quality cleanup
Topics
code-cleanuppre-commit-readylinting
PyPI keywords
automaticcleanfiximportunused

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 › “remove unused imports python”

  • autoflakeautoflake removes unused imports and unused variables from Python…
  • creosoteCreosote scans your Python project's source code and dependency…
  • pyclnPycln finds and removes unused import statements from Python code,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Quality Assurance packages

coverage Worth it
PyPI · Testing · released Aug 2026

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.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
ruff Worth it
PyPI · Python Modules · released Aug 2026

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.

MITcompiled wheel · 3.7+
316.1Mdownloads / mo
pexpect With conditions
PyPI · Software Development · released Nov 2023

Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.

ISCpure Pythonaging
200.8Mdownloads / mo
black Worth it
PyPI · Python Modules · released May 2026

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.

MITpure Python · 3.10+
179.9Mdownloads / mo
pytest-xdist Worth it
PyPI · Utilities · released Jul 2025

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.

MITpure Python · 3.9+
177.1Mdownloads / mo
cfn-lint Worth it
PyPI · Quality Assurance · released Aug 2026

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.

MIT-0pure Python
114.9Mdownloads / mo

See also pycln · pyflakes · yesqa · deadcode · pip-autoremove · vulture · autopep8 · creosote · pip-check-reqs · uncalled