{"id":15680850,"url":"https://github.com/thombashi/cleanpy","last_synced_at":"2025-07-08T17:35:59.506Z","repository":{"id":62562536,"uuid":"237725051","full_name":"thombashi/cleanpy","owner":"thombashi","description":"cleanpy is a CLI tool to remove caches and temporary files related to Python.","archived":false,"fork":false,"pushed_at":"2025-06-23T02:24:13.000Z","size":166,"stargazers_count":18,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-02T03:05:13.299Z","etag":null,"topics":["cache-cleaner","cleaner","cli-tool","disk-cleaner"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thombashi.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-02-02T05:45:25.000Z","updated_at":"2025-04-30T06:32:13.000Z","dependencies_parsed_at":"2023-11-24T03:05:55.975Z","dependency_job_id":"55edfa90-344c-4b11-ac6b-c070f10de8ab","html_url":"https://github.com/thombashi/cleanpy","commit_stats":{"total_commits":168,"total_committers":3,"mean_commits":56.0,"dds":"0.023809523809523836","last_synced_commit":"4428baf6ee3b6496e17f6f5c2d80fea1cf04e37f"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":"thombashi/python-lib-project-template","purl":"pkg:github/thombashi/cleanpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thombashi%2Fcleanpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thombashi%2Fcleanpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thombashi%2Fcleanpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thombashi%2Fcleanpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thombashi","download_url":"https://codeload.github.com/thombashi/cleanpy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thombashi%2Fcleanpy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264315108,"owners_count":23589709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache-cleaner","cleaner","cli-tool","disk-cleaner"],"created_at":"2024-10-03T16:44:59.228Z","updated_at":"2025-07-08T17:35:59.425Z","avatar_url":"https://github.com/thombashi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. contents:: **cleanpy**\n   :backlinks: top\n   :depth: 2\n\nIntroduction\n============================================\n``cleanpy`` is a CLI tool to remove caches and temporary files related to Python.\n\n|PyPI pkg ver| |CI status| |CodeQL|\n\n\nInstallation\n============================================\n\nInstallation: pip\n--------------------------------------------\n::\n\n    pip install cleanpy\n\n|Supported Python implementations| |Supported Python versions|\n\nInstallation: snap\n--------------------------------------------\n::\n\n    sudo snap install cleanpy\n\n.. image:: https://snapcraft.io//cleanpy/badge.svg\n    :target: https://snapcraft.io/cleanpy\n    :alt: snapcraft status\n\n\nUsage\n============================================\n::\n\n    cleanpy DIR_PATH [DIR_PATH ...]\n\n``cleanpy`` will remove cache files and temporary files under the ``DIR_PATH``.\n\nRemoving files or directories targets are as follows:\n\n- Files to be deleted:\n    - ``*.pyc``\n    - ``*.pyo``\n\n- Directories to be deleted:\n    - ``__pycache__``\n    - ``.cache``\n    - ``.mypy_cache``\n    - ``.pytest_cache``\n    - ``.ruff_cache``\n\nYou can also remove additional files/directories if the following options are specified:\n\n- ``--include-builds``:\n    - ``build`` directory\n    - ``dist`` directory\n    - ``docs/_build`` directory: ``[sphinx]``\n    - ``*.manifest`` files: ``[pyinstaller]``\n    - ``*.spec`` files: ``[pyinstaller]``\n- ``--include-envs``:\n    - ``.venv`` directory\n    - ``.nox`` directory\n    - ``.tox`` directory\n- ``--include-metadata``:\n    - ``.eggs`` directory\n    - ``*.egg-info`` directories\n    - ``.pyre`` directory\n    - ``.pytype`` directory\n    - ``pip-wheel-metadata`` directory\n- ``--include-testing``:\n    - ``.coverage`` file\n    - ``coverage.xml`` file\n    - ``nosetests.xml`` file\n\nAll the above options are specified if you use the ``--all`` option.\n\nThe following directories are always excluded from the remove:\n\n- ``.git``\n- ``.hg``\n- ``.svn``\n- ``node_modules``\n\nExecution example\n--------------------------------------------\n\nClean the current directory except for virtual environments:\n\n::\n\n    cleanpy --all --exclude-envs .\n\nCommand help\n--------------------------------------------\n::\n\n    usage: cleanpy [-h] [-V] [--list] [--follow-symlinks] [--dry-run] [-a] [--include-builds] [--include-envs] [--include-metadata] [--include-testing] [--exclude PATTERN] [--exclude-envs] [-i | -f] [-v |\n                   --debug | --quiet]\n                   DIR_PATH [DIR_PATH ...]\n\n    cleanpy will remove cache files and temporary files under the DIR_PATH.\n\n    Skip directories from recursive search: .git, .hg, .svn, node_modules\n\n    positional arguments:\n      DIR_PATH            path to a root directory to search.\n\n    options:\n      -h, --help          show this help message and exit\n      -V, --version       show program's version number and exit\n      --list              print target directories/files. this does not actually remove directories/files.\n      --follow-symlinks   follow symlinks.\n      --dry-run           don't actually do anything.\n      -i, --interactive   prompt on each file/directory delete.\n      -f, --force         delete file/directory without prompt.\n      -v, --verbose       shows the verbose output.\n      --debug             for debug print.\n      --quiet             suppress execution log messages.\n\n    Remove Target:\n      -a, --all           remove all of the caches and temporary files.\n      --include-builds    remove files/directories that are related to build: build, dist, docs/_build\n      --include-envs      remove virtual environment caches.\n      --include-metadata  remove metadata.\n      --include-testing   remove test results and coverage files.\n      --exclude PATTERN   a regular expression for files and directories to be excluded from the removes.\n      --exclude-envs      exclude virtual environments from deletion.\n\n    Issue tracker: https://github.com/thombashi/cleanpy/issues\n\n\nDependencies\n============================================\nPython 3.9+\n\n- no external package dependencies\n- platform independent\n\n\n.. |PyPI pkg ver| image:: https://badge.fury.io/py/cleanpy.svg\n    :target: https://badge.fury.io/py/cleanpy\n    :alt: PyPI package version\n\n.. |CI status| image:: https://github.com/thombashi/cleanpy/actions/workflows/ci.yml/badge.svg\n    :target: https://github.com/thombashi/cleanpy/actions/workflows/ci.yml\n    :alt: CI status of Linux/macOS/Windows\n\n.. |CodeQL| image:: https://github.com/thombashi/cleanpy/actions/workflows/github-code-scanning/codeql/badge.svg\n    :target: https://github.com/thombashi/cleanpy/actions/workflows/github-code-scanning/codeql\n    :alt: CodeQL\n\n.. |Supported Python versions| image:: https://img.shields.io/pypi/pyversions/cleanpy.svg\n    :target: https://pypi.org/project/cleanpy\n    :alt: Supported Python versions\n\n.. |Supported Python implementations| image:: https://img.shields.io/pypi/implementation/cleanpy.svg\n    :target: https://pypi.org/project/cleanpy\n    :alt: Supported Python implementations\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthombashi%2Fcleanpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthombashi%2Fcleanpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthombashi%2Fcleanpy/lists"}