putzen-cli 3.2.0

helps keeping your disk clean of build and dependency artifacts safely
Documentation

License: GPL v3 crates.io dependency status Build Status

"putzen" is German and means cleaning. It helps keeping your disk clean of build and dependency artifacts safely.

demo

About

In short, putzen solves the problem of cleaning up build or dependency artifacts. It does so by a simple "File" -> "Folder" rule. If the "File" and "Folder" is present, it cleans "Folder"

It also does all this fast, means in parallel (if the filesystem supports it).

Supported Artifacts

putzen supports cleaning artifacts for:

type file that is checked folder that is cleaned
rust Cargo.toml target
javascript package.json node_modules
CMake CMakeLists.txt build

furthermore, it does also support:

  • It can do run a dry-run (-d)
  • Interactive asking for deletion
  • Sums up the space that will be freed

Quick Start

Install

On Linux as snap

Get it from the Snap Store

TL;DR:

sudo snap install putzen

With cargo

To install the putzen, you just need to run

cargo install putzen-cli

Note the binary is called putzen (without -cli)

to verify if the installation was successful, you can run which putzen that should output similar to

$HOME/.cargo/bin/putzen

Usage

$ putzen --help

Usage: putzen [-v] [--scores] [-d] [-y] [-L] [-a] [--no-hidden] [--hidden <hidden...>] [--] [<folder>]

help keeping your disk clean of build and dependency artifacts

Positional Arguments:
  folder            path where to start with disk clean up.

Options:
  -v, --version     show the version number
  --scores          show the stored highscore board and exit
  -d, --dry-run     dry-run will never delete anything, good for simulations
  -y, --yes-to-all  switch to say yes to all questions
  -L, --follow      follow symbolic links
  -a, --dive-into-hidden-folders
                    include every hidden directory (== --hidden '*')
  --no-hidden       skip every hidden directory (overrides the default
                    `.worktrees`)
  --hidden          glob of hidden directories to descend into (repeatable).
                    Match is against the full basename including the leading
                    dot, e.g. `.worktrees`, `.{worktrees,jj}`, `.work*`.
                    Default: `.worktrees`.
  --help, help      display usage information

Hidden directories

putzen skips hidden directories by default, except for .worktrees — projects that colocate git worktrees inside the repo get cleaned in one run.

  • --hidden <GLOB> — pick which hidden dirs to descend into (repeatable). Default: .worktrees. Glob is matched against the full basename including the leading dot, so write .worktrees, .{worktrees,jj}, .work*.
  • --no-hidden — skip all hidden directories (pre-3.x behavior).
  • -a / --dive-into-hidden-folders — descend into every hidden directory (equivalent to --hidden '*').

These three are mutually exclusive.

Highscores

Every putzen run earns you a little reward. The biggest single cleanup and the biggest total run ever measured are kept as a tiny gold/silver/bronze podium. Keep running it on your machine and watch your records stack up over time — show the board any time with --scores:

❯ putzen --scores

   ──── ★ SINGLE CLEANUP ★ ────
     🥇 Gold
         40.1GiB · 2026-03-14
   ────────────────────────────
     🥈 Silver
         37.9GiB · 2026-03-10
   ────────────────────────────
     🥉 Bronze
          6.5GiB · 2026-03-14
   ────────────────────────────

   ──── ★    TOTAL RUN   ★ ────
     🥇 Gold
         60.3GiB · 2026-03-14
   ────────────────────────────
     🥈 Silver
         44.6GiB · 2026-03-10
   ────────────────────────────
     🥉 Bronze
         19.6GiB · 2026-04-03
   ────────────────────────────

Alternative Projects

License