Remove all files .pyc with recrusive method

This method simple but important. Example in your project dir is like this:

project_dir/
           __init__.py
           __init__.pyc
           something.py
           something.pyc
           ...
           core/
               __init__.py
               __init__.pyc
               build.py
               build.pyc

Deleting the .pyc files one by one would be spending a lot of time. and you will be bored. There is sample how to handle it.

$ find your_dir -name *.pyc -delete

OR, if you work inside current directory.

$ find . -name *.pyc -delete
AM

Written by Agus Makmun Author

SDE Lead working across the whole stack: backend, frontend, databases and the infrastructure that ships them. These days mostly infrastructure and Next.js, like moving apps off Vercel and Supabase to self-hosted.

arrow_backPrevious post Email BackEnd with SMTP Gmail
search esc