Write-Output "Deleting __pycache__ directories and .pyc files..." # Remove __pycache__ directories Get-ChildItem -Path . -Recurse -Directory -Filter "__pycache__" | ForEach-Object { Write-Output "Deleting directory $_.FullName" Remove-Item -Recurse -Force $_.FullName } # Remove .pyc files Get-ChildItem -Path . -Recurse -File -Filter "*.pyc" | ForEach-Object { Write-Output "Deleting file $_.FullName" Remove-Item -Force $_.FullName } Write-Output "Done!"