Skip to main content

Remove a package and its unused dependencies

Project description

https://img.shields.io/pypi/dm/pip-autoremove.svg https://img.shields.io/pypi/v/pip-autoremove.svg https://img.shields.io/pypi/l/pip-autoremove.svg

Remove a package and its unused dependencies.

Quickstart

First, install pip-autoremove:

$ pip install pip-autoremove

Install a package which has dependencies, e.g. Flask:

$ pip install Flask

...
Successfully installed Flask Werkzeug Jinja2 itsdangerous markupsafe
Cleaning up...

Uninstall it and all its unused dependencies:

$ pip-autoremove Flask -y

Flask 0.10.1 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
    Werkzeug 0.9.6 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
    Jinja2 2.7.3 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
        MarkupSafe 0.23 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
    itsdangerous 0.24 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)

Uninstalling MarkupSafe:
  Successfully uninstalled MarkupSafe
Uninstalling Jinja2:
  Successfully uninstalled Jinja2
Uninstalling itsdangerous:
  Successfully uninstalled itsdangerous
Uninstalling Werkzeug:
  Successfully uninstalled Werkzeug
Uninstalling Flask:
  Successfully uninstalled Flask

Remove multiple packages and their dependencies at once:

$ pip install Flask Sphinx

...
Successfully installed Flask Sphinx Werkzeug Jinja2 itsdangerous Pygments docutils markupsafe
Cleaning up...
$ pip-autoremove Flask Sphinx -y

Sphinx 1.2.2 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
    Jinja2 2.7.3 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
        MarkupSafe 0.23 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
    Pygments 1.6 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
    docutils 0.12 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
Flask 0.10.1 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
    Werkzeug 0.9.6 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
    Jinja2 2.7.3 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
        MarkupSafe 0.23 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
    itsdangerous 0.24 (/tmp/pip-autoremove/.venv/lib/python2.7/site-packages)
...

Usage

Usage: pip-autoremove [OPTION]... [NAME]...

Options:
  --version     show program's version number and exit
  -h, --help    show this help message and exit
  -l, --list    list unused dependencies, but don't uninstall them.
  -L, --leaves  list leaves (packages which are not used by any others).
  -y, --yes     don't ask for confirmation of uninstall deletions.

Installation

$ pip install pip-autoremove

Copyright 2014 invl

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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

pip-autoremove-0.10.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

pip_autoremove-0.10.0-py2.py3-none-any.whl (5.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pip-autoremove-0.10.0.tar.gz.

File metadata

  • Download URL: pip-autoremove-0.10.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pip-autoremove-0.10.0.tar.gz
Algorithm Hash digest
SHA256 1328c6f6ef54b1ea51dd4dd78199d7f8b27c2344e9517fbb4f89edf3bfbb32ba
MD5 517d91f5017a1881baeb7b9bd015d116
BLAKE2b-256 9ed8c6d74dc649b064d70bd7a6cb022f185f2c49d771ffb3a23d9dae57cea9ca

See more details on using hashes here.

File details

Details for the file pip_autoremove-0.10.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pip_autoremove-0.10.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pip_autoremove-0.10.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 093c7d9d73c66c191cbaac159bf32a0b2e7cdbc108f1935dacb5d5e09bee9eca
MD5 9313963239109757fe4ab74f53e300ce
BLAKE2b-256 813307306f6de85b42ae5a8db4b0bf6abd447c699d3902998a7f873e6bce6c2c

See more details on using hashes here.

Supported by

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