A simple utility to recursively find and remove all .pytest_cache folders.
This project uses uv. If you don't have uv installed, you can find the installation instructions here.
Install UV with:
pipx install uv .
Once uv is installed, you can install the dependencies and the tool by running:
cd path/to/pytestcachecleaner
uv sync
uv tool install .Alternatively, you can use pip:
pip install .This will register the tool as ptcc
To remove all .pytest_cache folders in the current directory and its subdirectories, simply run:
ptccYou can also specify a different root directory:
ptcc /path/to/your/projectThe tool will print the number of .pytest_cache folders that were removed.
Contributions are welcome! Please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.