Skip to main content

A tool to show which pip packages are not depended on by any other package

Project description

Dependeless

A tiny CLI tool to find installed pip packages that nothing depends on.

Perfect for cleaning up cluttered Python environments.


🤔 Why?

Over time, Python environments get messy:

  • You install packages to try things out
  • Dependencies change
  • Projects get deleted

And suddenly you have dozens of packages… with no idea which are still needed.

Dependeless helps you identify packages that are likely safe to remove.


⚠️ Important

Dependeless does NOT check if a package is used in your code.

It only finds packages that:

are not required by any other installed package

This means:

  • ✅ Good for finding leftover dependencies
  • ❌ Not guaranteed safe to uninstall

👉 Always review results before removing anything.


📦 Installation

pip install dependeless

🚀 Usage

Run inside your virtual environment:

dependeless

Or specify a custom pip:

dependeless --pip-path /path/to/pip

🧾 Example output

Using pip at /usr/bin/pip
Scanning 42 packages...

Non-dependent packages:
requests
numpy
pytest

Suggested cleanup command:

pip-autoremove -y requests numpy pytest

🙈 Ignoring packages

By default, pip and dependeless are ignored.

You can exclude additional packages:

dependeless --ignore "pip, setuptools, my_package"

🧠 How it works

Dependeless runs:

  • pip list to get installed packages
  • pip show <package> to inspect each package

It then checks the Required-by field:

  • empty → no packages depend on it
  • non-empty → used as a dependency

⏱ Performance

Dependeless calls pip show for every package.

This means:

  • 🐢 Can be slow in large environments
  • ⚡ Works best in smaller or moderately sized environments

✅ When is this useful?

  • Cleaning up old virtual environments
  • Investigating bloated global installs
  • Debugging dependency issues
  • After lots of pip install / experimentation

🚫 When NOT to use this

  • As a replacement for dependency management tools like:

    • Poetry
    • Pipenv
  • To detect unused imports in your code


💡 Tip

For a clean workflow, combine Dependeless with:

  • fresh virtual environments (venv)
  • pinned dependencies (requirements.txt)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dependeless-0.1.2.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dependeless-0.1.2-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file dependeless-0.1.2.tar.gz.

File metadata

  • Download URL: dependeless-0.1.2.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for dependeless-0.1.2.tar.gz
Algorithm Hash digest
SHA256 76411a37ac666e2dba2697ec2ce21d40cc302038566bb41f3ade2ac59a1581cc
MD5 9b48996bce672198699b05cefe40f04c
BLAKE2b-256 a3e8dfc4d2b68f554c6c08a1f02de38799c30795a190ae14b1d8fb72514f8fad

See more details on using hashes here.

File details

Details for the file dependeless-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: dependeless-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for dependeless-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 37965d4fbb7d11703997702a1f311ae422e4556c31fc3f41ff44bca3ae73962a
MD5 c1e30d0dfeabdcf67e0a8da798db6b1d
BLAKE2b-256 aaed3b81f1adb0908674f5913c2535a2e51ec0324a13222b5ecdfc4cfcd1692a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page