Skip to main content
  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
  โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ• โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•
  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  
  โ–ˆโ–ˆโ•”โ•โ•โ•โ• โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•  
  โ–ˆโ–ˆโ•‘     โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
  โ•šโ•โ•      โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•  โ•šโ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•

๐Ÿงน The Zero-Latency Developer Bloat & Zombie Process Reaper

Reclaim 50GB of dev debris and slay zombie dev servers in seconds. Now agent-native with a built-in MCP server, headless engine API, and CI bloat budget gates.

PyPI version GitHub Release Python 3.10+ MCP License: MIT CI Passing Speed Zero Bloat


The Problem โ€ข What's New in v3.0 โ€ข MCP Integration โ€ข Key Features โ€ข Terminal UI โ€ข Quick Start โ€ข Commands โ€ข Quarantine Vault โ€ข Purge Scoring Engine โ€ข Drive Radar โ€ข Configuration โ€ข Supported Artifacts โ€ข Architecture


๐Ÿ’ฅ The Problem

Modern developers juggle dozens of repositories and tools every month. After a few weeks, engineering laptops silently hoard 40GB to 100GB+ of developer debris:

  • Abandoned node_modules from tutorials and archived experiments.
  • Massive Rust target/ directories silently consuming 15GB each.
  • Dormant Python .venv environments and build artifacts (dist, .next, .turbo, .astro).
  • Bloated Global Package Caches (npm, pnpm, pip, uv, cargo, bun, deno) accumulating stale tarballs indefinitely.
  • Zombie Dev Servers left running in background terminal tabs, holding ports :3000, :5173, or :8000, draining RAM, and causing frustrating EADDRINUSE errors.

Existing tools are fragmented: npkill only cleans npm; cargo clean requires manually visiting each repository; docker prune only handles containers; and finding port hogs requires cryptic lsof -i :3000 and kill -9 terminal dances.

purge is a unified, blazing-fast reaper. It scans your workspaces concurrently, prunes directory traversal at artifact boundaries, audits global caches, slays process trees holding your dev ports, and lets you reclaim 50GB in seconds.


๐Ÿš€ What's New in v3.0 โ€” Agent-Native Reclamation

  • ๐Ÿค– Native MCP Server (purge mcp): purge's full intelligence โ€” scan, scoring, inspection, cleaning, quarantine vault, zombie hunting, telemetry โ€” exposed as Model Context Protocol tools. Drive disk hygiene from Claude Desktop, IDE agents, or any MCP host. Destructive tools are dry-run by default and require an explicit confirm=True argument.
  • ๐Ÿง  PurgeEngine Headless API (purge.core.api.PurgeEngine): the same engine the CLI uses, callable from Python. One facade for scan/inspect/clean/vault/zombies/stats โ€” no terminal required. Scripts, CI pipelines, and MCP hosts observe identical semantics.
  • ๐Ÿšฆ CI Bloat Budget Gate (purge scan --fail-over 2GB): exits with code 2 when reclaimable bloat exceeds a threshold. Fail builds before debris piles up.
  • ๐Ÿ”’ Vault Security Hardening: quarantine manifests are validated at restore time โ€” tampered manifests can no longer redirect restoration into system paths or vault-internal locations. Negative and unsupported size inputs can no longer silently disable filters.
  • โšก Git Intelligence Optimization: repository inspection consolidated from 3 to 2 subprocess calls per repo (GIT_OPTIONAL_LOCKS=0), cutting cold-inspection cost by ~39%.
  • ๐Ÿงน Polish: telemetry panel markup leak fixed, trash dependency declared as an official [trash] extra with honest error classification, version banner now tracks the package version.

v2.0 highlights below are all still present: Priority Scoring, Quarantine Vault, Drive Radar, Exporter, Parallel Deletion, ecosystem heuristics.


๐Ÿš€ What's New in v2.0

  • ๐ŸŽฏ Purge Priority Scoring Engine (0-100 Index): Intelligent composite score weighting size footprint, staleness, ecosystem re-creation cost, and Git repository state. Easily target high-value bloat with --min-score or --auto.
  • ๐Ÿ›ก๏ธ Quarantine Undo Vault (purge clean --vault / purge vault restore): Zero accidental data loss. Move targets to a local quarantine vault instead of permanent deletion, with instant 1-second one-command restoration.
  • ๐Ÿ’พ Drive Capacity Radar (purge disk / purge top): Visual partition health analysis displaying total/used/free space, developer bloat percentage, and potential free disk gain.
  • ๐Ÿ“‘ Multi-Format Audit Exporter (purge export): Export comprehensive markdown reports, RFC-4180 CSV spreadsheets, or structured JSON for team audits and CI/CD pipelines.
  • โšก High-Concurrency Parallel Deletion (--workers 4): Multi-threaded deletion pool with robust Windows file-lock retry backoff and readonly clearing.
  • ๐ŸŒ Expanded Ecosystem Support: Native heuristic detection for Bun (~/.bun/install/cache), Deno (~/.cache/deno), Swift PM (.build), Zig (.zig-cache, zig-out), CMake (CMakeFiles), PHP Composer (vendor), and Ruby Bundler.

โšก Key Features

  • โšก Sub-Second Parallel Crawl: Never gets bogged down by millions of files inside node_modulesโ€”prunes traversal at candidate boundaries and sizes directories concurrently in <20ms.
  • ๐ŸงŸ Process Tree Port Slayer (purge free <PORT>): Free ports in one command. Recursively terminates parent processes and all orphaned child worker trees (SIGTERM -> SIGKILL cascade).
  • ๐ŸŒ Global Cache Auditing & Pruning (purge cache): Discovers and purges multi-gigabyte package manager global caches (npm, pnpm, yarn, bun, deno, pip, uv, cargo, go, gradle, composer).
  • ๐ŸŒฟ Git Worktree Intelligence: Non-destructive scan flags repositories with uncommitted changes (--git-aware, --skip-uncommitted) and displays last-commit age indicators.
  • ๐Ÿ“ˆ Lifetime Reclamation Telemetry (purge stats): Persistent local telemetry tracking cumulative bytes reclaimed and zombie processes terminated over time.
  • ๐ŸŽฏ Interactive Selection Mode (-i / --interactive): Pick and choose specific artifacts via numbers or comma-separated lists before purging.
  • ๐Ÿค– Autonomous Reclamation (--auto): Automatically selects and purges safe, high-scoring targets (Score โ‰ฅ 65) without manual picking.
  • โš™๏ธ Declarative Configuration (purge init): Native purge.toml and pyproject.toml [tool.purge] support for team-level ignore paths, custom target rules, and depth limits.

๐Ÿ’ป Terminal UI

When you run purge scan across your workspace:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   ๐Ÿงน Developer Bloat & Zombie Process Reaper โ€ข Zero Bloat                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ v3.0.0 โ€ข https://github.com/shenald-dev/purge โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

                       ๐Ÿ“ฆ Reclaimable Bloat Targets (4)                        
โ”Œโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ # โ”‚ Category         โ”‚ Path                     โ”‚    Files โ”‚ Git Status โ”‚   Stale โ”‚  Score โ”‚         Size โ”‚
โ”œโ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 1 โ”‚ Node.js & Web    โ”‚ ~/Projects/web/node_modโ€ฆ โ”‚   48,120 โ”‚ Clean      โ”‚ 42d ago โ”‚ 92/100 โ”‚     1.42 GB  โ”‚
โ”‚ 2 โ”‚ Rust / Cargo     โ”‚ ~/Projects/engine/target โ”‚    4,890 โ”‚ Uncommittedโ”‚ 18d ago โ”‚ 45/100 โ”‚   820.50 MB  โ”‚
โ”‚ 3 โ”‚ Python           โ”‚ ~/Projects/ai/.venv      โ”‚    6,410 โ”‚ Clean      โ”‚ 89d ago โ”‚ 85/100 โ”‚   410.20 MB  โ”‚
โ”‚ 4 โ”‚ Node.js & Web    โ”‚ ~/Projects/app/.next     โ”‚    1,210 โ”‚ Clean      โ”‚   Today โ”‚ 35/100 โ”‚   120.00 MB  โ”‚
โ””โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

                    ๐ŸงŸ Zombie Dev Servers & Port Hogs (2)                     
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚      PID โ”‚ Name           โ”‚    Port    โ”‚     Memory โ”‚ Trees โ”‚ Command / Working Dir                 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚    48210 โ”‚ node           โ”‚   :3000    โ”‚   142.0 MB โ”‚     3 โ”‚ ~/Projects/web (Next.js Dev Server)   โ”‚
โ”‚    19420 โ”‚ python         โ”‚   :8000    โ”‚    86.4 MB โ”‚     1 โ”‚ ~/Projects/ai (FastAPI Uvicorn)       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ“Š PURGE REAPER TELEMETRY โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                                                                             โ”‚
โ”‚  Reclaimable Disk Space: 2.77 GB                                            โ”‚
โ”‚  โ€ข Total Targets: 4    โ€ข Total Files: 60,630    โ€ข Zombie Servers: 2         โ”‚
โ”‚  โ€ข ๐ŸŽฏ High Priority Targets (Score โ‰ฅ 65): 2                                โ”‚
โ”‚  Breakdown: Node.js: 1.54 GB | Rust: 820.50 MB | Python: 410.20 MB          โ”‚
โ”‚                                                                             โ”‚
โ”‚  Scanned 840 directories in 0.015s.                                         โ”‚
โ”‚                                                                             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

Installation

Install directly via pip:

pip install purge-reaper

Or install via pipx or uv:

pipx install purge-reaper
# or
uv tool install purge-reaper

Optional extras:

pip install "purge-reaper[mcp]"    # MCP server for AI agents (Python 3.11+)
pip install "purge-reaper[trash]"  # --trash mode (send2trash)

๐Ÿค– MCP Integration (AI Agents)

purge ships a native Model Context Protocol server. Once installed with the [mcp] extra, any MCP host can reclaim disk space conversationally.

Claude Desktop / generic claude_desktop_config.json:

{
  "mcpServers": {
    "purge": {
      "command": "purge",
      "args": ["mcp", "--transport", "stdio"]
    }
  }
}

VS Code / other hosts โ€” run the server directly:

purge mcp --transport stdio
purge mcp --transport streamable-http --host 127.0.0.1 --port 8000

Exposed tools: scan, inspect_path, clean, kill_zombies, port_status, vault_list, vault_show, vault_restore, stats, server_info.

Safety model: clean, kill_zombies, and vault_restore refuse to execute unless the caller passes confirm=True; without it they return a dry-run preview. Protected system roots are rejected server-side before any operation runs.

Python library usage (headless engine):

from purge.core.api import PurgeEngine

engine = PurgeEngine(root_path="~/Projects")
report = engine.scan(min_score=65, sort_by="score")
print(report.human_total_size)

# Safe, reversible quarantine clean
result = engine.clean(artifacts=report.artifacts, to_vault=True)
engine.vault_restore(result.vault_session_id)  # one-command undo

๐Ÿ› ๏ธ Commands & Usage

1. Scan Workspace for Bloat (purge scan)

Sweep the current project tree or an entire drive for dev artifacts and running servers:

# Scan current directory
purge scan

# Scan your entire Projects directory
purge scan ~/Projects

# Filter by ecosystem
purge scan --node       # Only Node.js/Web (.next, node_modules, .astro)
purge scan --python     # Only Python (.venv, __pycache__, .pytest_cache)
purge scan --rust       # Only Rust (target/)

# Filter by staleness, minimum size, or priority score
purge scan --stale 30         # Untouched for 30+ days
purge scan --min-size 100MB   # Only items larger than 100MB
purge scan --min-score 70     # Only high-yield targets (score โ‰ฅ 70)

# Sort & limit
purge scan --sort score --top 10   # Top 10 highest-scoring targets
purge scan --sort stale            # Sort by longest untouched

# CI bloat budget gate: exit code 2 when reclaimable size exceeds threshold
purge scan ~/Projects --fail-over 2GB

# Include drive capacity radar
purge scan --disk

# Include global package manager caches
purge scan --global

2. Clean & Reclaim Disk Space (purge clean)

Execute safe, verified cleanup:

# Dry run simulation (calculates space without deleting)
purge clean --dry-run

# Autonomous mode: automatically clean high-scoring safe targets (Score โ‰ฅ 65)
purge clean --auto

# Quarantine mode: move to undo vault instead of permanent deletion
purge clean --vault

# Interactive selection (pick items by number e.g. 1, 3, 5)
purge clean -i

# Safeguard: Skip repositories with uncommitted git changes
purge clean --skip-uncommitted

# High-concurrency parallel deletion (4 worker threads)
purge clean --workers 4 --force

# Force purge + terminate zombie dev servers
purge clean --force --kill-zombies

# Move files to OS Trash / Recycle Bin instead of permanent deletion
purge clean --trash

3. Quarantine Vault & Undo (purge vault)

Safe staging and instant restoration:

# List all quarantine sessions
purge vault list

# Show items in a specific vault session
purge vault show vault_20261103_120000

# Restore quarantined items back to their original disk locations
purge vault restore vault_20261103_120000

# Permanently prune quarantine sessions older than 14 days
purge vault prune --days 14

4. Drive Capacity Radar (purge disk / purge top)

Analyze drive partition health and bloat percentage:

# Inspect drive capacity and top space consumers
purge disk

# Output machine-readable JSON
purge disk --json

5. Instant One-Shot Port Slayer (purge free / purge port)

Free any occupied development port without manually looking up PIDs:

# Inspect what process is hogging port 3000
purge free 3000

# Terminate the process and its entire child process tree
purge free 3000 --kill -y

# Alias command
purge port 5173 -k -y

6. Audit Report Exporter (purge export)

Export audit results to Markdown, CSV, or JSON:

# Export Markdown audit report
purge export ~/Projects --output audit_report.md

# Export CSV spreadsheet for team reviews
purge export ~/Projects --output audit_report.csv

7. Global Package Manager Caches (purge cache)

Audit and reclaim multi-gigabyte caches from npm, pip, uv, cargo, and more:

# Scan all global caches and show disk usage
purge cache

# Clean all discovered caches with confirmation
purge cache --clean

# Simulate cleaning without deleting
purge cache --clean --dry-run

8. Lifetime Reclamation Telemetry (purge stats)

Check cumulative metrics across all cleanups:

purge stats

๐ŸŽฏ Purge Scoring Engine

The Purge Score is an intelligent 0-100 composite index calculated from four primary factors:

  1. Size Factor (0-35 pts): Logarithmic scale rewarding larger space yields (โ‰ฅ2GB = 35pts).
  2. Staleness Factor (0-30 pts): Based on last-modified timestamps (โ‰ฅ90 days = 30pts).
  3. Ephemerality / Rebuild Cost (0-20 pts): Pure re-generable caches (node_modules, .next, target/) receive full marks; virtual environments require re-installation (+12pts).
  4. Git Repository Intelligence (0-15 pts / Safety Penalties): Repos with uncommitted changes receive an automatic -35 point penalty and are flagged CAUTION. Clean, dormant repos receive a bonus.
Score Range Classification Action Recommendation
65 - 100 SAFE / High Priority Immediate candidate for automated reclamation.
35 - 64 MODERATE Review if project is actively being developed.
0 - 34 CAUTION Active repository, recently modified, or uncommitted work.

๐Ÿ›ก๏ธ Quarantine Vault & Undo

Never worry about accidentally deleting an active development environment:

Target Path  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ [ purge clean --vault ]
                                    โ”‚
                                    โ–ผ
                ~/.config/purge/vault/<session_id>/
                     โ”œโ”€โ”€ item_1 (node_modules)
                     โ”œโ”€โ”€ item_2 (.venv)
                     โ””โ”€โ”€ manifest.json

                                    โ”‚
                                    โ–ผ
               [ purge vault restore <session_id> ]
                                    โ”‚
                                    โ–ผ
Target Path  โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Restored in 1 Second!

๐Ÿ’พ Drive Capacity Radar

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ’พ DISK CAPACITY & BLOAT RADAR (D:\) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                                                                      โ”‚
โ”‚  Mount: D:\    Device: D: (NTFS)                                     โ”‚
โ”‚                                                                      โ”‚
โ”‚  [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘]  53.2% Used                        โ”‚
โ”‚                                                                      โ”‚
โ”‚  โ€ข Total Capacity: 953.87 GB                                         โ”‚
โ”‚  โ€ข Used Space:     507.45 GB                                         โ”‚
โ”‚  โ€ข Free Space:     446.42 GB (46.8%)                                 โ”‚
โ”‚                                                                      โ”‚
โ”‚  โ€ข Developer Bloat: 48.60 GB                                         โ”‚
โ”‚  โ€ข Bloat accounts for 5.1% of total drive capacity (9.6% of used)    โ”‚
โ”‚  โ€ข Purging this bloat will increase free space by +10.9%             โ”‚
โ”‚                                                                      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โš™๏ธ Configuration

Configure purge on a per-project or workspace basis via purge.toml or pyproject.toml ([tool.purge]):

# purge.toml
[purge]
max_depth = 10
min_stale_days = 0.0
min_size_bytes = 0
min_score = 0.0
sort_by = "size"
workers = 4
git_aware = true
default_trash = false
default_vault = false
default_format = "terminal"

# Ignored paths or projects
ignore_paths = [
    "production-app/*",
    "legacy-service/.venv",
]

# Custom artifact target rules
[purge.custom_rules]
"Internal Caches" = [".custom_cache", "temp_artifacts"]

๐Ÿ“ฆ Supported Bloat Targets

Local Project Bloat

Ecosystem Targets Detected
Node.js & Modern Web node_modules, .next, .turbo, .nuxt, .astro, .solid, .remix, .output, .nx, .contentlayer, .parcel-cache, .svelte-kit, .docusaurus, bower_components
Python .venv, venv, env, .pytest_cache, .mypy_cache, .ruff_cache, __pycache__, .tox, .nox, .hypothesis, .ipynb_checkpoints
Rust / Cargo target (safeguarded: verified against Cargo.toml)
Systems & Native .build (Swift PM), .zig-cache, zig-out (Zig), CMakeFiles (CMake)
PHP & Ruby vendor (safeguarded: verified against composer.json or Gemfile)
Mobile & Cross-Platform .expo, Pods, .dart_tool, DerivedData
JVM & Build Systems .gradle, pom.xml target dirs, .bloop, .metals, .kotlinc
Universal Build Dirs dist, build, out, coverage, .nyc_output
OS Clutter .DS_Store, Thumbs.db
Dev Servers Zombie processes on :3000, :3001, :5173, :8000, :8080, :9000

Global Package Manager Caches

Package Manager Default Cache Locations Checked
npm ~/.npm/_cacache
pnpm ~/.local/share/pnpm/store, ~/AppData/Local/pnpm/store
yarn ~/.yarn/berry/cache, ~/.cache/yarn, ~/AppData/Local/Yarn/Cache
Bun ~/.bun/install/cache
Deno ~/.cache/deno, ~/AppData/Local/deno
pip ~/.cache/pip, ~/AppData/Local/pip/Cache
uv ~/.cache/uv, ~/AppData/Local/uv/cache
cargo ~/.cargo/registry/cache, ~/.cargo/git/db
go ~/go/pkg/mod/cache, ~/AppData/Local/go-build
gradle ~/.gradle/caches
Composer ~/.cache/composer, ~/AppData/Local/Composer/cache
Bundler ~/.bundle/cache

โš™๏ธ Architecture

                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚   User Target Path      โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ”‚
                                โ–ผ
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚   PurgeEngine (core API)   โ”‚  โ† v3: single headless facade
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                          โ”‚
                          โ–ผ
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚  Rapid Discovery Walk   โ”‚ (Sub-20ms pruning at
                    โ”‚    (os.scandir tree)    โ”‚  artifact boundaries)
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ”‚
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ–ผ                     โ–ผ                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Parallel Stat    โ”‚  โ”‚ Git Intelligence โ”‚  โ”‚ Zombie Hunter    โ”‚
โ”‚ & Scoring Pool   โ”‚  โ”‚ (2-call inspect) โ”‚  โ”‚ (Dev port trees) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚                     โ”‚                     โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
                           โ–ผ
               โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
               โ”‚ Purge Scoring Engine    โ”‚ (0-100 Priority Index)
               โ”‚ (Size, Age, Git State)  โ”‚
               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ–ผ                โ–ผ                  โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Cyberpunk TUI    โ”‚ โ”‚ MCP Server       โ”‚ โ”‚ Multi-Format      โ”‚
โ”‚ & CLI (Typer)    โ”‚ โ”‚ (10 agent tools) โ”‚ โ”‚ Exporter (md/csv)โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                    โ”‚                    โ”‚
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                    โ–ผ
      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
      โ”‚  Parallel Deletion /    โ”‚
      โ”‚  Quarantine Vault       โ”‚
      โ”‚  (validated manifests)  โ”‚
      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿค Contributing

Contributions are welcome! Please open an issue or PR on GitHub.

git clone https://github.com/shenald-dev/purge.git
cd purge
pip install -e ".[dev]"
pytest
ruff check .

๐Ÿ“œ License

MIT License. Designed and built with โค๏ธ by shenald-dev.

Metadata

Release files for purge-reaper 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for purge-reaper 3.0.0
File Size Uploaded Provenance Actions
purge_reaper-3.0.0.tar.gz 76.9 kB Without provenance Details for purge_reaper-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for purge-reaper 3.0.0
File Interpreter ABI Platform Actions
purge_reaper-3.0.0-py3-none-any.whl Python 3 none any Details for purge_reaper-3.0.0-py3-none-any.whl

Total release size: 132.1 kB

Release files / purge_reaper-3.0.0.tar.gz

Download URL purge_reaper-3.0.0.tar.gz
Size 76.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a74706910062e036ca73700881ecfdfb58651c1d02e2d2298f26ad728a921e97
BLAKE2b-256 checksum
How to use checksums
09777861c492d13513a7d161792a60303fbb23e93b47d53c14de8b90b1405af6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Release files / purge_reaper-3.0.0-py3-none-any.whl

Download URL purge_reaper-3.0.0-py3-none-any.whl
Size 55.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e47f365e8ea417271a0f784aeea8fb7ac677de94964de158c3c71ab689b5f5e
BLAKE2b-256 checksum
How to use checksums
9512c3b68ee87e5e9eb4be6c8189f35471faccfa34e80f9865364a38c1d46d65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Security for purge-reaper 3.0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page