Skip to content

Instantly share code, notes, and snippets.

@renatocfrancisco
Last active August 16, 2023 15:56
Show Gist options
  • Save renatocfrancisco/65920718b62230fd73a2f5145e191e00 to your computer and use it in GitHub Desktop.
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
@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