[Python] 패키지 한방에 삭제

Hyeseong·2020년 12월 1일
0

python

목록 보기
1/22
post-thumbnail

Remove all Python packages installed by pip

Option 1:

Use below command –

pip freeze | xargs pip uninstall -y

Option 2:

If there are any packages which were installed usig VCS, then we will exclude those . And then will remove the packages

pip freeze | grep -v "^-e" | xargs pip uninstall -y

Option 3:

  • Get the list of all Python pip package in the requirements.txt file – Note: This OVERWRITES the Existing requirements.txt else will create new one.
pip freeze > requirements.txt
  • Remove all packages – one by one
pip uninstall -r requirements.txt
  • Remove all packages at once –
pip uninstall -r requirements.txt -y
profile
어제보다 오늘 그리고 오늘 보다 내일...

0개의 댓글