pip uninstall
is too noisy.
It should list the package(s) and its directory/location, but instead it lists
all the files in there:
% pip uninstall pip
Uninstalling pip-9.0.1:
/home/user/.local/bin/pip
/home/user/.local/bin/pip3
/home/user/.local/bin/pip3.5
/home/user/.local/lib/python3.5/site-packages/pip-9.0.1.dist-info/DESCRIPTION.rst
/home/user/.local/lib/python3.5/site-packages/pip-9.0.1.dist-info/INSTALLER
/home/user/.local/lib/python3.5/site-packages/pip-9.0.1.dist-info/METADATA
/home/user/.local/lib/python3.5/site-packages/pip-9.0.1.dist-info/RECORD
/home/user/.local/lib/python3.5/site-packages/pip-9.0.1.dist-info/WHEEL
/home/user/.local/lib/python3.5/site-packages/pip-9.0.1.dist-info/entry_points.txt
/home/user/.local/lib/python3.5/site-packages/pip-9.0.1.dist-info/metadata.json
/home/user/.local/lib/python3.5/site-packages/pip-9.0.1.dist-info/top_level.txt
/home/user/.local/lib/python3.5/site-packages/pip/…
[almost 500 extra lines]
/home/user/.local/lib/python3.5/site-packages/pip/vcs/bazaar.py
/home/user/.local/lib/python3.5/site-packages/pip/vcs/git.py
/home/user/.local/lib/python3.5/site-packages/pip/vcs/mercurial.py
/home/user/.local/lib/python3.5/site-packages/pip/vcs/subversion.py
/home/user/.local/lib/python3.5/site-packages/pip/wheel.py
Proceed (y/n)? y
Successfully uninstalled pip-9.0.1
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Agreed. pip
should probably list just the directories and scripts it would remove, instead of all the files.
Hello !
What do you think about this display ?
$ pip uninstall hypothesis
Uninstalling hypothesis-3.5.0:
Proceed (y/n)? y
Successfully uninstalled hypothesis-3.5.0
And we can get verbose
version with -v
(--verbose
)
@AwesomeTurtle That's too terse. I'd suggest we need to at least list the number of files we'll be removing, and the top-level directories/files. Something like
$ pip uninstall pip
Uninstalling pip-9.0.1 (500 files):
/home/user/.local/bin/pip
/home/user/.local/bin/pip3
/home/user/.local/bin/pip3.5
/home/user/.local/lib/python3.5/site-packages/pip-9.0.1.dist-info/*
/home/user/.local/lib/python3.5/site-packages/pip/*
Proceed (y/n)? y
Successfully uninstalled pip-9.0.1
As you say, --verbose
can give the full list of files.
I have this display
# pip uninstall pip
Uninstalling pip-9.1.0.dev0 (503 files):
/usr/local/bin/pip
/usr/local/bin/pip3
/usr/local/bin/pip3.6
/usr/local/lib/python3.6/site-packages/pip-9.1.0.dev0-py3.6.egg-info/*
/usr/local/lib/python3.6/site-packages/pip/*
Proceed (y/n)?
Example with Django:
# pip uninstall django
Uninstalling Django-1.10.5 (4036 files):
/usr/local/bin/__pycache__/django-admin.cpython-36.pyc
/usr/local/bin/django-admin
/usr/local/bin/django-admin.py
/usr/local/lib/python3.6/site-packages/Django-1.10.5.dist-info/DESCRIPTION.rst/*
/usr/local/lib/python3.6/site-packages/Django-1.10.5.dist-info/INSTALLER/*
/usr/local/lib/python3.6/site-packages/Django-1.10.5.dist-info/LICENSE.txt/*
/usr/local/lib/python3.6/site-packages/Django-1.10.5.dist-info/METADATA/*
/usr/local/lib/python3.6/site-packages/Django-1.10.5.dist-info/RECORD/*
/usr/local/lib/python3.6/site-packages/Django-1.10.5.dist-info/WHEEL/*
/usr/local/lib/python3.6/site-packages/Django-1.10.5.dist-info/entry_points.txt/*
/usr/local/lib/python3.6/site-packages/Django-1.10.5.dist-info/metadata.json/*
/usr/local/lib/python3.6/site-packages/Django-1.10.5.dist-info/top_level.txt/*
/usr/local/lib/python3.6/site-packages/Django/*
Proceed (y/n)?
Ooops, there is a bug with Django !
/usr/local/lib/python3.6/site-packages/Django-1.10.5.dist-info/DESCRIPTION.rst/*
/usr/local/lib/python3.6/site-packages/Django-1.10.5.dist-info/INSTALLER/*
Huh? That wasn't what I was suggesting. There should be just one entry for the dist-info
directory.
Of course, this is all just proposal at this point. Until someone creates a PR, we're just speculating.
I suggest only to show root directory of package:
$ pip uninstall pip
Uninstalling pip-9.0.1 (500 files):
/home/user/.local/bin/pip/*
Proceed (y/n)? y
Successfully uninstalled pip-9.0.1
By this message you know number of files and package directory which is being deleted
@ibakirov There isn't just one root directory involved, in general. There's a .dist-info
directory as well, and in theory could be arbitrary locations in the wheel (for example setuptools
installs both a setuptools
directory and a pkg_resources.py
, and some wrapper executables in .../bin
as well as its .dist-info
directory). Hence my suggestion of all top-level directories or files, plus the total number of files
@pfmoore said: Until someone creates a PR, we're just speculating.
Here's a PR. ;)
Most helpful comment
@AwesomeTurtle That's too terse. I'd suggest we need to at least list the number of files we'll be removing, and the top-level directories/files. Something like
As you say,
--verbose
can give the full list of files.