Epikem
2/7/2018 - 12:59 PM

How to : 파이썬 모든 requirements.txt 패키지 제거하기

How to : Powershell python pip uninstall all requirements.txt package

On Powershell, uninstall all installed python pip packages from current python environment(or virtualenv) by using requirements.txt

  1. PS > pip freeze > reqs.txt

  2. PS > pip uninstall -r .\reqs.txt -y

  3. PS > rm reqs.txt

  4. creates reqs.txt which contains all the installed packages in current python env.

  5. removes all the requirements which listed in reqs.txt

  6. removes reqs.txt

PS > pip freeze > reqs.txt
PS > pip uninstall -r .\reqs.txt -y
Uninstalling appdirs-1.4.3:
  Successfully uninstalled appdirs-1.4.3
Uninstalling astdump-4.3:
  Successfully uninstalled astdump-4.3
Uninstalling astunparse-1.5.0:
  Successfully uninstalled astunparse-1.5.0
Uninstalling autopep8-1.3.2:
  Successfully uninstalled autopep8-1.3.2
Uninstalling baron-0.6.6:
  Successfully uninstalled baron-0.6.6
Uninstalling cffi-1.11.0:
  Successfully uninstalled cffi-1.11.0
Uninstalling dpath-1.4.0:
  Successfully uninstalled dpath-1.4.0
Uninstalling funcsigs-1.0.2:
  Successfully uninstalled funcsigs-1.0.2
Uninstalling future-0.16.0:
  Successfully uninstalled future-0.16.0
Uninstalling greenlet-0.4.12:
  Successfully uninstalled greenlet-0.4.12
Uninstalling mock-2.0.0:
  Successfully uninstalled mock-2.0.0
Uninstalling osquery-3.0.0:
  Successfully uninstalled osquery-3.0.0
Uninstalling pbr-3.1.1:
  Successfully uninstalled pbr-3.1.1
Uninstalling psptools-0.1:
  Successfully uninstalled psptools-0.1
Uninstalling psutil-5.4.3:
  Successfully uninstalled psutil-5.4.3
Uninstalling pycodestyle-2.3.1:
  Successfully uninstalled pycodestyle-2.3.1
Uninstalling pycparser-2.18:
  Successfully uninstalled pycparser-2.18
Uninstalling pypreprocessor-0.75:
  Successfully uninstalled pypreprocessor-0.75
Uninstalling redbaron-0.6.3:
  Successfully uninstalled redbaron-0.6.3
Uninstalling rope-0.10.7:
  Successfully uninstalled rope-0.10.7
Uninstalling rply-0.7.5:
  Successfully uninstalled rply-0.7.5
Uninstalling six-1.10.0:
  Successfully uninstalled six-1.10.0
Uninstalling thrift-0.10.0:
  Successfully uninstalled thrift-0.10.0
Uninstalling virtualenv-12.1.1:
  Successfully uninstalled virtualenv-12.1.1
Uninstalling WMI-1.4.9:
  Successfully uninstalled WMI-1.4.9
PS > pip freeze > reqs.txt
PS > pip uninstall -r .\reqs.txt -y