using rm-pycache https://pypi.org/project/rm-pycache/
rm-pycache
python3 -m pip install rm-pycache
rm_pycache()
you can specify the path, or otherwise will run in the current working directory.