Created
April 3, 2022 15:26
-
-
Save mancap314/6ff7fb7af4255caf5b130392087db168 to your computer and use it in GitHub Desktop.
Uninstalling all libraries in Python
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
#!/bin/bash | |
# shell script for removing all libraries installes | |
# could be useful for building a clean virtual environment on top of it | |
input="requirements.txt" | |
pip freeze > "${input}" | |
while IFS= read -r line; do | |
arrline=(${line//==/ }) | |
pip uninstall -y ${arrline[0]} | |
done < "${input}" | |
rm "${input}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment