Safety by design

Clean with confidence.

MacLean is a tool that deletes files — so deletion is treated as a high-risk operation. Every safeguard below is part of the open-source codebase you can audit.

The model

Scan first. Label impact. Confirm before delete.

1

Scan & classify

Every candidate gets an impact label: rebuildable, review-first, or protected.

2

Protect what matters

Protected apps and personal data are blocked behind an extra confirmation step.

3

Delete conservatively

Large files go to the trash by default; pure caches are marked before permanent removal.

4

Keep it restorable

Pending snapshots and a backup/restore manifest make removals reversible.

Deletion safeguards

How the safety layer works.

  • Physical identity checks (macOS):the file being deleted is compared by device & inode (st_dev/st_ino) before and during removal, closing the TOCTOU window. st_dev/st_ino
  • Staged atomic rename:candidates are moved to a staging path with RENAME_EXCL, then re-verified before finalizing. RENAME_EXCL
  • Trash-first policy:use_trash + is_restorable_by_move decide what goes to the trash instead of permanent deletion. use_trash + is_restorable_by_move
  • Timeout-protected review:a 300-second window keeps finalization under control; interrupted operations retain a pending snapshot.
  • Windows honesty:Windows uses atomic rename to shorten the race window; physical-identity comparison is documented as not yet implemented there.
  • No silent automation:the Free edition never deletes without an explicit user action. Dev-mode is a compile-time feature and is excluded from CI builds.
  • Auditable code:the safety layer lives in the public repository — read crates/maclean-core (safety, ops) and docs/safety/SAFETY_MODEL.md. crates/maclean-core

Quick answers about MacLean safety

Can MacLean accidentally delete my personal files?

The safety model is built to prevent that: protected apps are confirmed separately, browser data and other review-first items are never auto-selected, large files go to the trash, and removals are recorded for restore. The safety layer is open source and auditable.

Applicable to: Free edition default behavior · macOS primary; Windows safeguards partially implemented

Evidence: crates/maclean-core safety & ops; docs/safety/SAFETY_MODEL.md; 2026-10-12 code review. Updated: 2026-10-12

What should I do if I find a safety bug?

Report it privately first — never in a public issue. Use the GitHub Security Advisory flow. The maintainers commit to acknowledging within 24 hours and providing a fix plan within 7 days.

Applicable to: Responsible disclosure · Applies to all versions in security support

Evidence: SECURITY.md (responsible disclosure, response commitments). Updated: 2026-10-12