DEV Community

Wess Cope
Wess Cope

Posted on

Purge: Uninstaller for macOS That Goes Deep

Purge: A CLI Uninstaller for macOS That Goes Deep

Dragging apps to the trash on macOS leaves behind preferences, caches, and support files that waste space and can cause conflicts. purge (or prg) is a command-line tool that finds and removes all these hidden files.

Key Features

  • Smart Detection: Extracts app identifiers from Info.plist files
  • Thorough Scanning: Searches all standard macOS system locations
  • Interactive Selection: Choose which files to keep or delete
  • Self-Contained: Single binary with no runtime dependencies
  • Coming Soon: Dry-run mode to preview without deleting

Installation

# Via Homebrew
brew tap wess/packages
brew install purge

# Or manually
git clone https://github.com/wess/purge.git
cd purge
npm install
npm run build:mac
ln -sf "$(pwd)/dist/prg-macos-$(uname -m)" /usr/local/bin/prg
Enter fullscreen mode Exit fullscreen mode

Latest releases can also be downloaded at https://github.com/wess/purge (throw a star!)

Usage

prg /Applications/SomeApp.app
Enter fullscreen mode Exit fullscreen mode

An interactive checklist appears with all related files. Uncheck items to keep, press Enter to trash the rest.

Options:

  • -n, --dry-run: Preview files without deleting (coming soon)
  • -h, --help: Show help information

How It Works

  1. Reads the app's metadata to find identifiers
  2. Scans system folders where apps store their data
  3. Matches files based on naming patterns
  4. Displays all candidates for your review before deleting

Why Use Purge?

  • Clean System: Recover space from hidden caches and support files
  • Prevent Conflicts: Avoid issues when reinstalling applications
  • Terminal Efficiency: Perfect for command-line workflows and scripts
  • Complete Control: See exactly what's being removed

Join the Community

purge is open-source on GitHub. Issues, feature suggestions, and pull requests are welcome!


What leftover app files are hiding on your Mac? Try purge and let us know what you discover!

Top comments (0)