1#Write all modules to a txt file
2pip freeze > requirements.txt
3
4#Now to remove one by one:
5pip uninstall -r requirements.txt
6
7#If we want to remove all at once then:
8pip uninstall -r requirements.txt -y
1pip list --format=freeze | %{$_.split('==')[0]} | %{If(($_ -eq "pip") -or ($_ -eq "setuptools") -or ($_ -eq "wheel")) {} Else {$_}} | %{pip uninstall $_ -y}