How to delete all python packages

So, a few weeks ago I asked here in support how to delete the python files, but as I was using the translator because I’m not fluent in English I couldn’t understand what I meant, I wanted to delete all the python packages at once , they are taking up all the space on my disk and I was wondering how to delete it. Can someone help me?

Hi Lucas-topper,

Sorry for the difficulties in answering your question :slight_smile:

From my understanding of Python projects on Glitch, the packages are stored in ~/.local/lib/python2.7/site-packages and ~/.local/lib/python3.7/site-packages (this is the case on hello-flask at least)

You could open the Glitch terminal and navigate to this directory, and delete all files using the rm command.

Be careful, this will remove all packages. Maybe you could use the terminal to just delete the ones you want to remove.

cd ~/.local/lib/python2.7/
rm -rf ./site-packages
mkdir site-packages
cd ~/.local/lib/python3.7/
rm -rf ./site-packages
mkdir site-packages

This recreates the site-packages folder, for your app to (hopefully) start up again.

To reinstall packages from your requirements.txt:

cd ~
pip install -r requirements.txt 

I hope it helps! :snake::sunflower:


thanks, it worked i don’t really understand anything about python so i always need help when i use it for some testing.