Last active
August 16, 2023 15:56
-
-
Save renatocfrancisco/65920718b62230fd73a2f5145e191e00 to your computer and use it in GitHub Desktop.
listing installed global pip packages in a txt file and uninstalling all - github copilot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM Get a list of all globally installed packages | |
pip list --format=freeze > packages.txt | |
REM Uninstall each package one by one | |
for /f "delims=" %%i in (packages.txt) do ( | |
pip uninstall -y %%i | |
) | |
REM Delete the packages.txt file | |
del packages.txt | |
echo All packages uninstalled. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment