Reference / Developer artifacts

Is it safe to delete __pycache__ folders on a Mac?

Safe to delete

It rebuilds itself automatically — you do nothing.

**/__pycache__
What it is
Python bytecode cache — regenerated automatically
If you delete it
Python recompiles .pyc on next import — barely noticeable
Recovery time
about a minute
Category
Developer artifacts

Don't guess — let diskspace check it live.

It pressure-tests the path against your live disk state and stages it reversibly, so you never lose anything you needed.

$ brew install tymrtn/diskspace/diskspace $ diskspace explain **/__pycache__ # verdict + live pressure-test