This project has been archived by its maintainers, and is no longer receiving any updates.
photos-cleanup
photos-cleanup is a local web app for macOS. It helps you clear unwanted photos from your Photos library.
The photos-cleanup command starts a server on your Mac and opens the UI in your browser.
You review each cleanup pass as a thumbnail grid and mark every photo keep or delete.
When you commit, the app files the photos into albums in Photos.
Safety
The app never deletes a photo. Photos you mark delete go into an album for that pass, such as "Screenshots - Delete Me". Low-quality photos go to "Low Quality - Review Me". Photos you mark keep go into a "Keep" album, such as "Screenshots - Keep". Later runs skip them. You delete the photos yourself from that album in Photos. The app skips favorites and photos that are already in your own albums.
Privacy
Everything runs on your Mac.
The app reads your library with osxphotos.
Verdicts for screenshots and utility photos come from Apple's on-device Vision and Foundation Models.
A small Swift helper, photos_cleanup/verdict.swift, runs them.
The app compiles the helper with swiftc on first use.
It caches the helper and the verdicts in ~/Library/Caches/photos-cleanup.
The app makes no network calls and sends no telemetry.
Requirements
- macOS
- Python 3.11 or later, for the
uvandpipxinstalls - Full Disk Access for your terminal app, so the app can read the library
- Optional, for AI verdicts: macOS 27 or later with Apple Intelligence on, and the Xcode Command Line Tools
Without the optional items, all passes still work. Screenshots then start as "keep", and the UI says why.
Install
Use one of these commands.
brew install khivi/photos-cleanup/photos-cleanup
uv tool install macos-photos-cleanup
pipx install macos-photos-cleanup
Warning: the PyPI package is named macos-photos-cleanup.
Do not install photo-cleanup from PyPI.
It is an unrelated tool that deletes files.
The command is photos-cleanup.
To upgrade, run brew upgrade photos-cleanup or uv tool upgrade macos-photos-cleanup.
Permissions
The app needs two macOS permissions.
Full Disk Access
The app needs this to read the Photos library. Grant it to the terminal app that runs photos-cleanup.
- Open System Settings > Privacy & Security > Full Disk Access.
- Turn on your terminal app.
- Quit the terminal app and open it again.
- Run
photos-cleanupagain.
If access is off, the app opens this settings pane and names the terminal app.
Photos automation
The app writes albums through Photos with AppleScript. On your first commit, macOS asks if your terminal may control Photos. Click OK. To change this later, open System Settings > Privacy & Security > Automation.
Usage
- Run
photos-cleanup. Your browser opens athttp://127.0.0.1:8765/. - Pick a cleanup pass. The passes are screenshots, utility photos (receipts, tickets), and low quality.
- Review the thumbnail grid. Mark each photo keep or delete.
- Commit. Photos marked delete go into the pass's "Delete Me" album ("Review Me" for low quality). Keepers go into its "Keep" album.
- Open that album in Photos. Check it, then delete the photos there.
Photos keeps deleted items in Recently Deleted for 30 days. Restore a photo from there if you change your mind. Delete it from Recently Deleted to free space at once.
Press Ctrl-C in the terminal to stop the server.
Options
| Option | Effect |
|---|---|
--port N |
Listen on port N. The default is 8765. |
--no-browser |
Do not open the browser. |
--dev |
Start the API only, for pnpm dev. Implies --no-browser. |
--version |
Print the version and exit. |
Troubleshooting
The app checks your setup at startup. It stops with a message if a check fails.
| Message | Fix |
|---|---|
macOS only: it reads the Photos library. |
Run the app on a Mac. |
the web UI is missing. |
You run a source checkout. Run pnpm build, or use --dev. Installed packages include the UI. |
port N is in use by another program. |
Pick another port with --port. |
Already running at ... |
The app is already running. It reopens your browser and exits. |
no Photos library found. |
Open the Photos app once, then run the command again. |
can't read your Photos library: Full Disk Access is off. |
Follow the steps in Permissions. |
can't read the Photos library at ... |
Check the path in the message. Make sure the library is not damaged. |
couldn't load the Photos library: ... |
The library may be damaged or too new for osxphotos. Run brew upgrade photos-cleanup or uv tool upgrade macos-photos-cleanup. |
AI verdicts unavailable
The app prints a note when it cannot run AI verdicts. The note gives the reason. Everything else still works.
- "need macOS 27 or later with Apple Intelligence on": update macOS and turn on Apple Intelligence.
- "need the Xcode Command Line Tools": run
xcode-select --install.
Development
See CONTRIBUTING.md.
License
Metadata
Release files for macos-photos-cleanup 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| macos_photos_cleanup-0.2.0.tar.gz | 94.0 kB | With provenance | Details for macos_photos_cleanup-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| macos_photos_cleanup-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for macos_photos_cleanup-0.2.0-py3-none-any.whl |
Total release size: 196.6 kB
Release files / macos_photos_cleanup-0.2.0.tar.gz
| Download URL | macos_photos_cleanup-0.2.0.tar.gz |
|---|---|
| Size | 94.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91b9f736503f95918cf2922c53676ac1c62c28190a2387a53b708f6200499182
|
|
BLAKE2b-256 checksum How to use checksums |
e82c4951a91882b5c878e44a2010091996534d927f79240ad57d584c6e346e1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logRelease files / macos_photos_cleanup-0.2.0-py3-none-any.whl
| Download URL | macos_photos_cleanup-0.2.0-py3-none-any.whl |
|---|---|
| Size | 102.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81d200eaf1a1f53dfb1cf85ec4368ee75f4a3b8ee3961d2c9750000e2792bd9c
|
|
BLAKE2b-256 checksum How to use checksums |
4700ee3704e293665499d6a067cc9270b17f9fc90b2bfc7240ac6c26bde4a130
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logSecurity for macos-photos-cleanup 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for macos_photos_cleanup-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.