Skip to main content

seifenkehrer 🧼🧹: The Smart macOS Cleanup Tool

··557 words·3 mins

What is seifenkehrer?
#

seifenkehrer Logo

seifenkehrer (German for “soap sweeper”) is a modular, YAML-driven cleanup tool designed to keep your macOS system clean, organized, and free of clutter. Define custom cleanup tasks, review deletions interactively, and reclaim disk space with minimal effort.

Perfect for developers, power users, and anyone tired of manually hunting down cache files, outdated versions, or residual data.


πŸš€ Key Features
#

  • YAML-Based Task Configuration: Define cleanup rules in simple YAML files.
  • Interactive & Silent Modes: Review deletions before they happen or automate cleanup.
  • Smart Exclusions: Skip critical files with exclude and keep_newest rules.
  • Permission Handling: Force-delete read-only files (e.g., Go module cache, code-signed apps).
  • Interval-Based Runs: Schedule tasks to run at specific intervals (e.g., weekly).
  • Cross-Platform: Built with Go for macOS, Linux, and Windows compatibility.

πŸ“¦ Installation
#

1. Install Script (Recommended)#

Verifies SHA256 checksums and seeds default tasks:

curl -fsSL https://raw.githubusercontent.com/original-flipster69/seifenkehrer/main/install.sh | sh

2. Homebrew
#

brew tap original-flipster69/seifenkehrer
brew install seifenkehrer

3. Go Install
#

go install github.com/original-flipster69/seifenkehrer@latest

4. Build from Source
#

git clone https://github.com/original-flipster69/seifenkehrer.git
cd seifenkehrer
go build .

πŸ› οΈ Usage
#

Basic Commands
#

# List installed tasks
sk tasks

# Run interactive cleanup
sk clean

# Silent mode (no prompts)
sk clean --silent

# Custom tasks directory
sk clean --tasks-dir ./my-tasks

Example Output
#

After each run, Seifenkehrer displays a summary of freed space:

βœ… Chrome Old Versions: 1.2 GB freed
❌ Go Module Cache: 3 errors (hint: Run `go clean -modcache`)
πŸ“Š Total: 1.2 GB reclaimed

πŸ“ Task Configuration
#

Tasks are YAML files stored in ~/.seifenkehrer/tasks/. Example:

name: Chrome Old Versions
description: Removes outdated Google Chrome framework versions
globs:
  - /Applications/Google Chrome.app/Contents/Frameworks/Google Chrome Framework.framework/Versions/*
exclude:
  - Current
keep_newest: 1
interval: 168h  # Run weekly
force: true     # Handle read-only files
hint: "Update Chrome to avoid version bloat"

Supported Fields
#

FieldRequiredDescription
nameNoDisplay name (defaults to filename).
descriptionYesPurpose of the task.
globsYesFile patterns to match (supports ~ for home directory).
excludeNoBasenames to skip.
keep_newestNoKeep the N most recent matches.
intervalNoMinimum time between runs (e.g., 24h, 168h).
forceNoAdd write permissions before deleting (for read-only files).
hintNoCustom message shown after errors (e.g., recovery steps).

πŸ”§ Task Management
#

# Enable/disable tasks
sk config enable <task-name>
sk config disable <task-name>

# Set run interval
sk config interval <task-name> 24h

πŸ” How It Works
#

  1. Load Tasks: Scans ~/.seifenkehrer/tasks/ for .yaml/.yml files.
  2. Resolve Globs: Expands patterns, applies exclusions, and respects keep_newest.
  3. Check Intervals: Skips tasks if their interval hasn’t elapsed.
  4. Preview Matches: Shows files grouped by task with sizes.
  5. Prompt for Action: Choose to delete all, skip, or select individually.
  6. Force Permissions: For force: true tasks, adds write permissions before deletion.
  7. Report Results: Displays hints for errors and a total bytes-freed summary.

🎯 Use Cases
#

  • Developers: Clean Go module cache, Node.js node_modules, or Docker artifacts.
  • Designers: Remove Adobe cache or old font versions.
  • General Users: Delete browser cache, old downloads, or system logs.

πŸ“Œ Why Choose Seifenkehrer?
#

  • Lightweight: No GUI bloatβ€”just a CLI tool with YAML config.
  • Transparent: Review deletions before they happen.
  • Extensible: Add custom tasks for any cleanup scenario.
  • Open Source: MIT-licensed and community-driven.

πŸ“’ Get Involved
#


πŸ“„ License
#

MIT