{"id":8423,"library":"pip-autoremove","title":"pip-autoremove","description":"pip-autoremove is a command-line utility that extends pip's functionality to automatically remove a specified package along with any of its dependencies that are no longer required by other installed packages. It helps keep your Python environments clean and lean. The current version is 0.10.0, and it appears to be actively maintained with recent updates.","status":"active","version":"0.10.0","language":"en","source_language":"en","source_url":"https://github.com/invl/pip-autoremove","tags":["pip","cli","package management","dependency","cleanup"],"install":[{"cmd":"pip install pip-autoremove","lang":"bash","label":"Install pip-autoremove"}],"dependencies":[{"reason":"pip-autoremove operates as a pip subcommand and relies on pip's internal structure and functionality. It is not an installable Python dependency but a runtime requirement for the tool to function.","package":"pip","optional":false}],"imports":[{"note":"pip-autoremove extends the `pip` command and is used via the shell, not Python imports.","symbol":"pip-autoremove is a CLI tool.","correct":"This library is primarily a command-line interface tool and is not designed for direct programmatic import or use within Python scripts. Its functionality is exposed via the `pip autoremove` command."}],"quickstart":{"code":"pip install pip-autoremove\npip autoremove <package_name_to_remove>","lang":"bash","description":"Install the utility, then use `pip autoremove` followed by the package name(s) you wish to remove. It will prompt for confirmation before removing unused dependencies."},"warnings":[{"fix":"Check the pip-autoremove GitHub repository for compatibility notes or a newer version. You may need to downgrade your 'pip' version (e.g., `pip install pip==21.3.1`) if a compatible version of pip-autoremove is not yet available.","message":"pip-autoremove relies on pip's internal APIs, which are not stable and can change significantly between pip versions. This frequently leads to pip-autoremove breaking after pip updates.","severity":"breaking","affected_versions":"All versions"},{"fix":"Carefully read the output and confirm the removal only if you are certain. Avoid using `--force` or `--no-confirm` without prior inspection of the proposed changes.","message":"Always review the list of packages pip-autoremove proposes to remove. It might suggest removing packages that are explicitly installed but also happen to be a dependency of another package, or packages you wish to keep for other reasons.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Only use `--no-confirm` when you are absolutely sure of the operations, perhaps after a dry run or manual verification of the removal list without the flag.","message":"The `--no-confirm` or `-y` flag bypasses all interactive confirmation prompts. Using it carelessly can lead to unintended and irreversible package removals.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"First, ensure `pip install pip-autoremove` was successful. If installed, try closing and reopening your terminal or command prompt to refresh the shell's environment and pip's entry points.","cause":"The pip-autoremove package is either not installed or pip's internal command cache hasn't been refreshed, preventing the 'autoremove' subcommand from being recognized.","error":"ERROR: unknown command \"autoremove\""},{"fix":"This is a common issue due to `pip`'s unstable internal APIs. Check `pip-autoremove`'s GitHub for updates or compatibility warnings. You might need to upgrade `pip-autoremove` or temporarily downgrade `pip` (e.g., `pip install pip==21.3.1`) to a version known to be compatible.","cause":"This error, or similar `AttributeError` related to `pip._internal` modules, usually indicates an incompatibility between your installed version of `pip-autoremove` and the current version of `pip`.","error":"TypeError: 'NoneType' object is not subscriptable"},{"fix":"Verify the package name for typos. Ensure you are in the correct virtual environment where the package was originally installed, then retry the command.","cause":"The package you specified for removal is not found in the currently active Python environment.","error":"WARNING: Skipping <package_name> as it is not installed."}]}