skillfed

vulture

Find dead code

vulture v2.16 11.2M downloads/30d#1,410 on PyPI4,767
Permissive license The MIT License (MIT) Copyright (c) 2012-2020 Jendrik Seipp (jendrikseipp@gmail.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated… (full text in the JSON record) Active released

What it is and what it does

Vulture performs static analysis on Python source code to identify unused functions, classes, methods, variables, imports, and unreachable code blocks. It assigns confidence scores (60–100%) to each finding to indicate how certain it is that the code is genuinely dead, helping developers distinguish between high-confidence dead code and potential false positives that may result from Python's dynamic nature.

The tool is designed for code cleanup and quality improvement in large codebases. It can be run as a command-line tool on individual files or entire directories, integrated into pre-commit hooks, or used programmatically via its Python API. Configuration is supported through pyproject.toml, and false positives can be managed through whitelists, exclusion patterns, decorator ignoring, and name-matching rules.

Use it for:

  • Clean up large codebases by identifying and removing unused functions and classes that accumulate over time
  • Find untested code by running Vulture on both library and test suite to detect code paths not covered by tests
  • Detect unreachable code blocks and dead imports that may indicate logic errors or incomplete refactoring
  • Integrate into CI/CD pipelines via pre-commit hooks to prevent dead code from being committed to repositories
  • Suppress known false positives in dynamic code using whitelists and configuration rules

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Vulture is a static code analyzer that finds unused code in Python programs by scanning for dead functions, classes, variables, imports, and unreachable code blocks.

Yes. Vulture is a mature, actively maintained tool with no known vulnerabilities, low install friction, and permissive MIT licensing. It fills a genuine need in code quality workflows—static analysis alone cannot catch all dead code due to Python's dynamic nature, but Vulture's confidence scoring and false-positive suppression mechanisms make it practical for real projects.

Install

vulture on PyPI

pip

pip install vulture

uv

uv add vulture

poetry

poetry add vulture

Installing vulture

Before you install

Low friction install with a single lightweight dependency (tomli). The project is actively maintained with recent releases and supports Python 3.9 through 3.14.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for both open-source and commercial projects.

Quickstart

pip install vulture
vulture myscript.py
vulture myscript.py --min-confidence 100

Verify before relying

  • Accuracy of confidence scoring for different code types and whether 60–100% ranges hold across diverse codebases
  • Performance characteristics on very large codebases and whether static analysis speed scales linearly

Package facts

License The MIT License (MIT) Copyright (c) 2012-2020 Jendrik Seipp (jendrikseipp@gmail.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 1 — tomli
Maintenance actively maintained — 142 days since the last release
Last repo commit
First released
Downloads 11,204,416/month — #1,410 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: vulture-2.16-py3-none-any.whl

Keywords: dead, code, removal

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Quality Assurance

Tags

find dead code pythonunused code detectionstatic code analysisremove unused functionscode cleanup tooldead import finderpython code quality
code-qualitystatic-analysislinting

More Quality Assurance packages