Is it safe to delete __pycache__ folders?
Compiled Python files that Python saves next to your code so modules load faster.
Safe
Its owner recreates it by itself when it needs it, and nothing you made is lost.
~/
- Only when it contains *.pyc
- Never inside ~/
Library
What it is
When Python imports a module, it saves a compiled version in a __pycache__ folder next to the source file and reuses it until the source changes. Python ignores these files when the source file is missing and creates them again automatically, so removing them doesn't change how your code runs.
If it's removed
The first run afterward is slightly slower while Python compiles the modules again.
How it's removed
Moved to the Trash, where you can restore it.
The free analyzer finds it and explains it. Removing it is Pro, after a review sheet that lists every move and command. It starts checked in the Cleanup checklist, except inside Documents or Desktop.
Sources
Last checked on 26 Sep 2026. Every entry is written and checked by hand; the app and the command-line tool use the same words.