A utility to list and clear junk files created by macOS indexation.
Project description
macOS Junk Cleaner
A Python-based CLI utility to scan and remove macOS-specific junk files (e.g., .DS_Store, ._*, .Spotlight-V100) from directories.
Installation
Using pip
pip install .
Using uv
uv tool install .
Usage
Scan
To see what would be cleaned with a detailed summary:
mac-clean scan /path/to/dir
# or using uv
uv run mac-clean scan /path/to/dir
Clean
The clean command is used for removal. For safety, it defaults to dry-run mode.
# Preview deletion (Dry-run)
mac-clean clean /path/to/dir
# Perform actual deletion
mac-clean clean /path/to/dir --force
Development
Setup (uv)
- Clone the repository.
- Sync the environment (creates venv and installs all dependencies and dev tools):
uv sync - Install pre-commit hooks:
uv run pre-commit install
Linting and Formatting
This project uses Ruff for linting and formatting.
# Lint
ruff check .
# or using uv
uv run ruff check .
# Format
ruff format .
# or using uv
uv run ruff format .
Testing
pytest
# or using uv
uv run pytest
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file macos_junk_cleaner-1.0.0.tar.gz.
File metadata
- Download URL: macos_junk_cleaner-1.0.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2d756763356bdd4d23a6c97ce78ef051f3b373962166b4af5fb7994663d57b5
|
|
| MD5 |
59a93a03777bf0c0dee1886ff80d441a
|
|
| BLAKE2b-256 |
2be260dc39b038b6afbb28865e4213d6f4a066016f9c18f404187ed21c40c4f2
|
Provenance
The following attestation bundles were made for macos_junk_cleaner-1.0.0.tar.gz:
Publisher:
publish.yml on JCaet/mac-os-junk-cleaner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
macos_junk_cleaner-1.0.0.tar.gz -
Subject digest:
a2d756763356bdd4d23a6c97ce78ef051f3b373962166b4af5fb7994663d57b5 - Sigstore transparency entry: 782608949
- Sigstore integration time:
-
Permalink:
JCaet/mac-os-junk-cleaner@ee2a2937ba00fe615c125d95f47f90546ca1ef9c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/JCaet
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ee2a2937ba00fe615c125d95f47f90546ca1ef9c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file macos_junk_cleaner-1.0.0-py3-none-any.whl.
File metadata
- Download URL: macos_junk_cleaner-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
125adbd8e68c3acb53d0a7753720c0b212ea655df2ad000851133ad2dac5d885
|
|
| MD5 |
39e4f18f09629848952356b31a5240a7
|
|
| BLAKE2b-256 |
937a21f9dbbfa468a7780d3231ed901e1709290aedc342fa5968df6bded17606
|
Provenance
The following attestation bundles were made for macos_junk_cleaner-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on JCaet/mac-os-junk-cleaner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
macos_junk_cleaner-1.0.0-py3-none-any.whl -
Subject digest:
125adbd8e68c3acb53d0a7753720c0b212ea655df2ad000851133ad2dac5d885 - Sigstore transparency entry: 782608952
- Sigstore integration time:
-
Permalink:
JCaet/mac-os-junk-cleaner@ee2a2937ba00fe615c125d95f47f90546ca1ef9c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/JCaet
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ee2a2937ba00fe615c125d95f47f90546ca1ef9c -
Trigger Event:
workflow_dispatch
-
Statement type: