Skip to content

Instantly share code, notes, and snippets.

@ostwalprasad
Created July 15, 2020 13:00
Show Gist options
  • Save ostwalprasad/3239f011fa4f5af12df420eced7a234e to your computer and use it in GitHub Desktop.
Save ostwalprasad/3239f011fa4f5af12df420eced7a234e to your computer and use it in GitHub Desktop.
Clear __pycache__ folders and files from project folder
python -Bc "import pathlib; [p.unlink() for p in pathlib.Path('.').rglob('*.py[co]')]"
python -Bc "import pathlib; [p.rmdir() for p in pathlib.Path('.').rglob('__pycache__')]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment