Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Squeegee

Squeegee is a Windows cleanup tool for the terminal. It is inspired by Mole, the excellent macOS cleanup and maintenance tool, and follows the same safety-first shape: a small command router, categorized cleanup modules, a disk explorer, dry-run previews, operation logging, and guarded deletion paths.

The clean, purge, and analyze features are implemented.

Install

Install the latest prebuilt Windows release from Windows PowerShell 5.1 (which comes with Windows) or PowerShell 7:

irm https://raw.githubusercontent.com/ryanchen01/squeegee/master/install.ps1 | iex

The installer selects the x64 or ARM64 release for the current computer, verifies its SHA-256 checksum, installs sqe.exe into %USERPROFILE%\.local\bin, and adds that directory to the current user's PATH if necessary. Open a new terminal after the first install.

To install a specific version from a cloned copy of the repository:

.\install.ps1 -Version v0.2.2

Prebuilt ZIP files and their checksums are also available on the GitHub Releases page.

Update an installed copy to the latest release with:

sqe update

Check the installed version with:

sqe version

Build from source

Building requires Go 1.23 or later. Install Go, then run:

git clone https://github.com/ryanchen01/squeegee.git
cd squeegee
.\scripts\install-source.ps1

To build without installing:

.\scripts\build.ps1
.\bin\sqe.exe clean --dry-run
.\bin\sqe.exe analyze

Usage

Run sqe with no arguments to open the interactive command menu. Use the arrow keys and Enter, or press a command's number, to launch it.

sqe

Preview first:

sqe clean --dry-run

Clean the discovered targets:

sqe clean

Run the terminal as Administrator to include the small set of system-wide targets. Without elevation, user-level cleanup still runs and system targets are reported as skipped.

sqe clean --list-targets
sqe clean --whitelist
sqe clean --debug

Dry-run details are written to %LOCALAPPDATA%\squeegee\clean-list.txt. Cleanup operations are logged as JSON Lines in %LOCALAPPDATA%\squeegee\operations.jsonl; set SQE_NO_OPLOG=1 to disable operation logging.

Purge project artifacts

Like Mole's mo purge, sqe purge scans project containers for rebuildable dependency and build-artifact directories. Preview the candidate list first:

sqe purge --dry-run
sqe purge

The scanner uses exact artifact names including node_modules, target, build, dist, Python virtual environments and tool caches, .next, .nuxt, .turbo, .gradle, obj, .dart_tool, .zig-cache, coverage, and other portable targets from Mole. A valid CACHEDIR.TAG signature is also accepted. Every candidate must be inside a verified project, scans stop at depth 6, and nested artifacts are pruned with their parent artifact.

Artifacts containing activity from the last seven days are preserved. Generic bin directories are excluded unless they are recognizable .NET Debug/Release output, and vendor is included only for Composer projects. Reparse points, cloud-synced user trees, protected paths, and whitelist matches are excluded. Interactive live runs open a selection screen before confirmation. Use the arrow keys to move, Space to toggle an artifact, A to select all, I to invert, and X to deselect the current project. Non-interactive runs select only artifacts proven inactive for seven days.

By default, purge scans the full user profile and every fixed local drive other than C:. Mapped network, removable, and cloud-synced drives and folders (including OneDrive, iCloud, Dropbox, Google Drive, Box, pCloud, MEGA, Sync, Proton Drive, Nextcloud, ownCloud, and Tresorit) are excluded. Project and artifact validation still applies beneath those broad scan roots. Application data and package-manager stores are also skipped so installed extensions and cached packages are not misclassified as source projects. Configure exact locations with:

sqe purge --paths
sqe purge --include-empty --dry-run

Paths are stored in %LOCALAPPDATA%\squeegee\purge-paths.txt. Purge operations use the same guarded permanent-removal path, whitelist, five-minute timeout, and operations.jsonl log as sqe clean.

Analyze disk usage

Open the fixed-drive overview:

sqe analyze

Start directly in a folder, or use the British spelling accepted by Mole:

sqe analyze C:\Users\you\Projects
sqe analyse D:\

The full-screen explorer responds to each key immediately—no Enter is needed for navigation. It sorts immediate children by total size and lets you drill down without following directory junctions or symbolic links. It also tracks the 100 largest files of at least 100 MiB below the current path.

Rows appear as soon as the directory is listed, then sizes, totals, warnings, and large-file results update live as bounded background workers finish each child. Pending folders remain navigable, and live re-sorting keeps the cursor on the same row instead of following an item as it moves. Entering a folder cancels the current parent scan and immediately starts the selected folder; going back restarts the parent scan instead of leaving stale partial totals. Pending rows are static, and complete frames are written without clearing the screen first to avoid flicker during long scans.

Each row's bar and percentage show its share of the current folder's scanned size. While a scan is active, the heading changes to SHARE (MEASURED) because that denominator grows as more children finish.

Key Action
Up / Down Move by row
PageUp / PageDown Move by page
Enter / Right Explore a directory
Escape / Left Go back; Escape quits from the overview
t Toggle the top-large-files view
/ Type a live name/path filter; Enter applies and Escape cancels
Space Mark or unmark an item
Delete Preview and recycle marked items after y confirmation
o / r Open in Explorer or refresh
q / Ctrl+C Quit

A ~ hint marks conventional rebuildable directories such as node_modules, target, .venv, and directories containing a valid CACHEDIR.TAG. It is only a hint: Squeegee never removes an analyzed item without selection and confirmation.

For scripts and agents, use JSON:

sqe analyze --json C:\Users\you\Projects

The output contains path, overview, size-sorted entries, large_files, total_size, and total_files. Scan sizes are byte counts; unreadable paths are skipped and reported on stderr. The default overview includes fixed local drives only, avoiding surprise scans of mapped network drives and removable media. Pass an explicit path to inspect another accessible volume.

Analyze-driven removal is recoverable: Squeegee uses the Windows Shell to move each selected path to the Recycle Bin. Drive roots, user-folder roots, %WINDIR%, Program Files, ProgramData, $Recycle.Bin, and System Volume Information are protected. Junction and symbolic-link targets are never traversed. Successful and failed analyze operations use the same operations.jsonl log as clean.

What sqe clean scans and cleans

Squeegee preserves every listed cache directory and removes only its eligible children. Missing targets are ignored, active/locked files are skipped, and Windows junctions and symbolic links are never traversed. The Recycle Bin is the exception: it is emptied through the supported Windows Shell API, matching Explorer's "Empty Recycle Bin" operation across all drives.

Section Scanned and cleaned
User essentials Recycle Bin contents on all drives;%TEMP% entries older than 24 hours; %LOCALAPPDATA%\CrashDumps entries older than 7 days; per-user Windows Error Reporting queue/archive entries older than 7 days
Windows caches INetCache, Explorer thumbnail/icon caches, browser history cache, Remote Desktop bitmap cache, Microsoft Store app AC\Temp folders; DirectX D3DSCache; NVIDIA DXCache, GLCache, and NV_Cache; AMD DxCache, GLCache, and VkCache
Browsers Cache, code cache, GPU/shader cache, and Dawn cache directories for every Chrome, Edge, and Brave profile; Firefoxcache2 and startupCache
Applications 87 portable target definitions for known app cache, code/GPU/Dawn/shader cache, logs, crash reports, web caches, Docker Desktop logs, OneDrive logs, and the exact special-purpose caches listed below
Developer tools npm, Yarn, pip, pipx, Poetry, uv, Scoop, node-gyp, Electron, Go, NuGet, Cargo, rustup, Android, and Gradle caches; JetBrains cache/log/temp; Visual Studio component/image caches; native dotnet, pnpm, and uv cleanup commands
System (Administrator) %WINDIR%\Temp entries older than 24 hours; system Windows Error Reporting queue/archive entries older than 14 days; shared NVIDIA shader cache

Application coverage

Squeegee now has 87 application target definitions covering safe Windows equivalents for more than 70 of Mole's cross-platform app families:

  • Editors and developer apps: Visual Studio Code, VS Code Insiders, Sublime Text, Zed, CodeBuddy, Postman, GitHub Desktop, Bruno, and draw.io.
  • Communication: Slack, Discord variants, Legcord, Zoom, old and new Microsoft Teams, WeChat, Tencent Meeting, WeCom, QQ, Feishu/Lark, DingTalk, WhatsApp, and Skype.
  • AI clients: ChatGPT, Claude, LM Studio, Codex desktop, Cherry Studio, and Kimi desktop.
  • Creative tools: Figma, Adobe media caches, DaVinci Resolve, Blender, Cinema 4D, and SketchUp.
  • Productivity and notes: Notion, Obsidian, Logseq, Evernote, Yinxiang, flomo, Spacedrive, Folo, Quark, Todoist, Any.do, and Spark Desktop.
  • Media, games, and emulators: Spotify browser cache, Plex desktop, NetEase Cloud Music, QQ Music, Kugou, Kuwo, Stremio, VLC artwork, iQIYI, Tencent Video, Bilibili, Douyu, Huya, qBittorrent, Transmission, Epic Games Launcher, EA app, GOG Galaxy, Riot Client, Minecraft, Lunar Client, PCSX2, and RPCS3.
  • Utilities: Youdao Dictionary, Eudic, Camo, Warp, mihomo-party, Clash Verge, TeamViewer, AnyDesk, ToDesk, Sunlogin, Docker Desktop logs, and OneDrive logs.

The dotnet nuget locals all --clear, pnpm store prune, and uv cache prune commands run during a live clean when their executable is available in PATH. Dry-run reports these command targets but never invokes them because the tools do not offer a uniform, non-mutating size preview.

For Chromium/Electron applications, the exact app root is preserved and only children named Cache, Network\Cache, Code Cache, GPUCache, known Dawn/shader caches, logs/Logs, and Crashpad\reports are scanned. Additional targets are equally narrow: for example VS Code extension/webview caches, Adobe media cache directories, Spotify's browser cache, Stremio's streaming cache, Epic's versioned webcache* directories, and Minecraft logs/crash reports.

No drive letter, user name, or path from the development computer is embedded in the catalog. At runtime Squeegee resolves %USERPROFILE%, %APPDATA%, %LOCALAPPDATA%, %ProgramData%, %WINDIR%, and %TEMP%. Supported Microsoft Store package roots are discovered beneath the current user's %LOCALAPPDATA%\Packages; all remaining path fragments are app-relative.

This is substantially closer to Mole but not literal one-for-one parity. Mole has roughly 195 explicit macOS app-cache cleanup call sites plus a broad ~/Library/Caches pass. Squeegee omits macOS-only software and any Windows mapping that would require treating ambiguous application data as disposable. Examples include Xcode, Final Cut Pro, ScreenFlow, IINA, Downie, Pacifist, CleanShot, Airmail, Alfred, and The Unarchiver. It also deliberately leaves Telegram tdata, Spotify storage/offline media, editing source/generated-media trees, Steam's installation tree, and launcher download payloads alone.

Windows has no single app-cache root with the same semantics as ~/Library/Caches; Squeegee never infers that every directory named Cache is disposable. Applications installed to custom data locations may therefore need future exact mappings.

Browser cookies, history, passwords, sessions, bookmarks, extensions, profiles, local storage, IndexedDB, and service-worker/offline web data are not targeted. Application settings, workspaces, projects, and saved state are not targeted.

Deliberate non-targets

Squeegee does not clean Downloads, Documents, Desktop, OneDrive content or other cloud placeholders, Windows Update/Delivery Optimization staging, Windows.old, restore points, the WinSxS component store, browser profiles, credentials, package installations, Docker/WSL virtual disks, developer source trees, node_modules, build output inside projects, IDE settings, or offline media.

Emptying the Recycle Bin is permanent. Use sqe clean --dry-run to see its aggregate item count and size before running a live clean. Squeegee uses Microsoft's documented SHQueryRecycleBinW and SHEmptyRecycleBinW APIs rather than deleting $Recycle.Bin internals directly.

Windows already provides Storage Sense and Disk Cleanup for policy-driven cleanup of Recycle Bin content, Downloads, cloud dehydration, Windows Update files, and other operating-system-owned data. Squeegee intentionally leaves those higher-impact choices to Windows. See Microsoft's documentation for Storage Sense and cleanmgr.

This boundary also matches Mole: Mole deliberately keeps macOS Software Update-owned staging (/Library/Updates and /macOS Install Data) read-only. Squeegee therefore does not delete %WINDIR%\SoftwareDistribution\Download, Delivery Optimization data, or component-store files. Windows servicing state can change between a scan and a delete; operating-system-owned cleanup stays with Storage Sense, Disk Cleanup, Delivery Optimization's own cmdlets, or DISM.

Whitelist

Run sqe clean --whitelist to create and locate the whitelist file. Add one absolute path per line. Environment variables and a leading ~ are expanded; the listed path and all descendants are skipped.

# %LOCALAPPDATA%\squeegee\whitelist.txt
%LOCALAPPDATA%\pip\Cache\http-v2
%APPDATA%\Code\CachedData

Always run sqe clean --dry-run after changing protection rules.

Architecture

The project mirrors Mole's separation of concerns while using a native Windows implementation:

  • cmd/sqe is the thin command entrypoint.
  • internal/cli routes commands.
  • internal/analyze owns volume discovery, no-follow scanning, JSON output, the terminal explorer, and Analyze-specific deletion protection.
  • internal/clean owns command orchestration and categorized target catalogs.
  • internal/core owns whitelist parsing, path protection, no-follow deletion, size accounting, and operation logging.
  • internal/platform contains Windows privilege detection and Windows Shell Recycle Bin integration.
  • internal/units contains display formatting.

Known-target cleanup goes through core.Guard.Remove. The guard requires an absolute catalog path under approved Windows user/system roots, rejects protected roots, checks ancestry for reparse points, and recursively removes without following reparse points. Analyze never calls that permanent-cleanup funnel: its explicitly selected items pass a separate critical-path guard and then go to the Recycle Bin through IFileOperation with FOFX_RECYCLEONDELETE.

License

Squeegee is available under the MIT License.

About

A Windows cleanup tool for the terminal inspired by Mole

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages