Skip to content

YKKULTRA/squeakyclean

Repository files navigation

SqueakyClean

A macOS cleaner that treats uncertainty as a stop sign.

Inspect known leftover locations, review the evidence, and quarantine only what you approve.

macOS CI macOS 14 or newer Swift 6.3

Build from source · Safety model · Changelog

SqueakyClean scan workspace in dark mode

SqueakyClean is a native SwiftUI utility for careful macOS cleanup. It scans an allowlisted set of leftover locations, explains why a finding is actionable, and keeps cleanup reversible until you explicitly purge it. Scanning and cleanup happen locally.

Note

SqueakyClean is an early, deliberately narrow preview. Today it offers cleanup only for user LaunchAgent plists whose configured absolute target is definitively missing. It is not yet a general cache cleaner or app uninstaller.

Why SqueakyClean

Evidence first Reversible by default Local and transparent
Uncertain ownership is ignored, never treated as proof that data is abandoned. Approved items enter an app-managed quarantine and can be restored before purge. Every candidate includes a reason and evidence. There are no third-party Swift package dependencies.

Most cleaners optimize for how much they can find. SqueakyClean optimizes for how confidently it can leave the right things alone.

How it works

flowchart LR
    A["Read-only scan"] --> B["Explain the evidence"]
    B --> C["You review and approve"]
    C --> D["Revalidate path, identity, and evidence"]
    D --> E["Journal and quarantine"]
    E --> F["Restore"]
    E --> G["Explicit purge"]
Loading
  1. Scan: Standard mode inventories selected user locations. Deep mode adds system-wide locations for analysis only.
  2. Classify: The rules fail closed. Protected, installed, Apple-managed, inaccessible, unresolved, and unknown data is not offered for cleanup.
  3. Review: Search, filter, inspect evidence, select one or many candidates, and approve the exact items you want moved.
  4. Revalidate: Immediately before a move, SqueakyClean checks the canonical path, filesystem identity, modification state, ownership, and missing-target evidence again.
  5. Quarantine: The move is journaled and fingerprinted. Restore remains available until a separately confirmed purge.

Important

Quarantine normally does not free disk space because the payload remains on the same disk. Space is reclaimed only after a separate, explicitly confirmed purge. Displayed sizes are allocated-byte estimates.

Current cleanup scope

Finding Current behavior
User LaunchAgent with an absolute target confirmed missing Reviewable cleanup candidate
Unmatched app-like data Ignored as unknown
Installed-app or Apple-managed data Blocked
Relative, malformed, unresolved, or inaccessible launch target Left untouched
Any /Library finding from Deep mode Analysis only
Cache, log, preference, Application Support, temporary, or receipt data Inventoried, but not actionable in this release

This narrow scope is intentional. A catalog miss or an old file is not enough evidence that something is safe to remove.

Safety by design

  • Read-only until approval. Scanning never mutates discovered files.
  • Fail-closed decisions. Unknown or incomplete evidence stops the cleanup path.
  • Approval-time revalidation. Allowed roots, protected paths, filesystem identity, modification state, installed-app ownership, and launch-target evidence are checked again around the move.
  • Crash-aware transactions. An atomically written journal and cross-process lock serialize quarantine, restore, and purge operations. Ambiguous interrupted states remain visible instead of being guessed away.
  • Verified restore. Type-separated SHA-256 fingerprints cover full file contents and deterministic directory entries, including hidden files and package contents. Restore verifies the payload before and after moving it.

The detailed invariants and current trust boundaries are documented in the safety model.

Quick start

Requirements

  • macOS 14 or newer
  • A Swift 6.3-capable toolchain
  • Xcode Command Line Tools for building and code signing

Build the app

git clone https://github.com/YKKULTRA/squeakyclean.git
cd squeakyclean
Scripts/build-app.sh
open build/SqueakyClean.app

The default local build targets the current Mac architecture and uses an ad hoc signature. To build a universal app for Apple silicon and Intel Macs:

ARCHS="arm64 x86_64" Scripts/build-app.sh

For Developer ID signing, select an installed identity:

ARCHS="arm64 x86_64" \
CODE_SIGN_IDENTITY="Developer ID Application: Example, Inc. (TEAMID)" \
Scripts/build-app.sh

Real signing identities automatically enable the hardened runtime and request a secure timestamp. BUILD_DIR, MACOSX_DEPLOYMENT_TARGET, and WARNINGS_AS_ERRORS=1 provide additional build controls.

Development

swift build -Xswiftc -warnings-as-errors
swift test -Xswiftc -warnings-as-errors
ARCHS="arm64 x86_64" WARNINGS_AS_ERRORS=1 Scripts/build-app.sh

GitHub Actions performs strict release builds and tests, packages a universal app bundle, verifies its architectures and signature, and uploads the archive as a workflow artifact.

Project layout

Path Purpose
Sources/SqueakyCleanCore Inventory, classification, path policy, quarantine, restore, and audit logic
Sources/SqueakyCleanApp SwiftUI interface and user workflows
Tests/SqueakyCleanCoreTests Core correctness and transaction-safety coverage
Resources/Info.plist App bundle metadata
Scripts/build-app.sh Native or universal app packaging, signing, and verification

FAQ

Does SqueakyClean delete anything automatically?

No. Scans are read-only. A candidate moves only after explicit approval, and permanent purge requires a separate destructive confirmation.

Is Full Disk Access required?

No. Start without it. The app explains when a deliberately selected scan location could not be read, and its access check is a practical probe rather than an operating-system entitlement verdict.

Does it remove caches or Application Support folders?

Not in the current release. Those locations may be inventoried, but only positively identified dead user LaunchAgents can become cleanup candidates.

Where does SqueakyClean keep its own data?

Audit history, transaction state, and quarantined payloads live under ~/Library/Application Support/SqueakyClean.

Project status

SqueakyClean is currently version 0.1.0 and under active development. This repository ships source code and development artifacts, not a notarized public release. Public distribution still requires Developer ID signing, Apple notarization, and a finalized permissions story.

A project license has not yet been selected. See the changelog for the latest work and known scope.

About

Evidence-first macOS cleanup: quarantine user LaunchAgents with definitively missing targets, restore with verification, and leave uncertain data untouched.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages