What is the BEST way to clear out all the __pycache__  folders and .pyc/.pyo files from a python3 project. I have seen multiple users suggest the pyclean script bundled with Debian, but this does not remove the folders. I want a simple way to clean up the project before pushing the files to my DVS.
From the project directory type the following:
Deleting all .pyc files
find . -path "*/*.pyc"  -delete
Deleting all .pyo files:
find . -path "*/*.pyo"  -delete
Finally, to delete all '__pycache__', type:
find . -path "*/__pycache__" -type d -exec rm -r {} ';'
If you encounter permission denied error, add sudo at the begining of all the above command.
Python3 project remove __pycache__ folders and .pyc files