v0.2.1 Rust Edition 2021 MIT Licensed

Reclaim NVMe Storage
Without Gambling Your Saves.

A safety-first CLI and interactive TUI utility designed to sniff out and reclaim orphaned Steam/Proton compatdata prefixes and compiled shader caches on Linux and Steam Deck.

curl -sSL https://raw.githubusercontent.com/Bvaughan7/prefixpug/main/install.sh | bash
prefixpug — Interactive Terminal User Interface
PrefixPug Interactive TUI Demo

The Prime Directive: Safety Above All

Any ambiguity in drive mounts, active processes, or file types must resolve toward keeping the data. Never gamble a save to reclaim a few gigabytes.

🛡️

Multi-Library Mount Guard

Parses all libraries from libraryfolders.vdf. If any secondary NVMe drive or external SSD is disconnected at scan time, PrefixPug halts immediately (Exit Code 2) rather than misclassifying games on that drive as orphans.

🎮

Non-Steam Shortcut Parser

Parses Valve's binary shortcuts.vdf across every user profile, computing 32-bit CRC directory hashes. Your hand-configured Battle.net, Heroic, and emulator prefixes are never flagged as orphans.

🐕

The Pug's Nose (Save Vault)

Inverts traditional extension allowlists. Sniffs entire directory trees (Saved Games, Documents, AppData) minus expendable caches, safely capturing extensionless, .json, and .xml saves.

🔒

Cryptographic Fsync Vaults

Every save archive is compressed, audited with per-file SHA-256 hashes in manifest.json, and flushed with File::sync_all() before any prefix unlinking is permitted.

Infrastructure Deny-List

Proton Experimental, Proton Hotfix, Steam Linux Runtime containers, EasyAntiCheat, and BattlEye runtimes are permanently locked from cleanup.

📏

Honest Block Accounting

Measures actual allocated filesystem blocks (st_blocks * 512) rather than apparent file size, accurately accounting for Proton's sparse files and registry hives.

Why Not A Shell Script?

Writing rm -rf against compatdata is easy. Handling real-world edge cases without destroying games and saves is difficult.

Scenario Naive Shell Script (rm -rf) PrefixPug
Disconnected Drive Misclassifies games as orphans & destroys live prefixes Verifies all library mounts; aborts immediately (Exit 2)
Non-Steam Shortcuts Wipes custom launchers & emulators (no appmanifest) Parses binary shortcuts.vdf across all user accounts
Custom Local Saves Silent, permanent data loss Automatic SHA-256 fsynced save vaults before unlinking
Active Game or Download Deletes files during live write operations Detects running Steam processes and aborts cleanly
Host Symlinks Can traverse outside prefix and unlink $HOME files Strict path traversal jail; unlinks only symlink file

Safe-By-Default CLI & Scripting

PrefixPug runs in dry-run simulation mode by default. Non-interactive deletion requires explicit confirmation.

# Launch interactive Ratatui TUI dashboard (default)
prefixpug

# Read-only audit of ALL prefixes (installed, non-Steam, runtimes, orphans)
prefixpug audit

# Filter installed games with prefixes untouched for >90 days
prefixpug audit --stale

# Low-risk cleanup: Purge only compiled shader caches
prefixpug shaders --yes

# Archive save files for an AppID on demand without deleting the prefix
prefixpug vault 1245620

# Verify a save vault against its cryptographic SHA-256 manifest
prefixpug verify-backup 1245620_1725408000

🎮 Steam Deck & Decky Loader Plugin

PrefixPug includes a native SteamOS Decky Loader plugin with a React Quick Access Menu (QAM) interface. Clean shader caches and vault saves directly in Gaming Mode.

View Decky Plugin Docs →