#cleanup #filesystem #command-line #rules

bin+lib putzen-cli

helps keeping your disk clean of build and dependency artifacts safely

9 stable releases

1.0.9 Oct 31, 2024
1.0.8 Jul 15, 2024
1.0.7 Jan 21, 2023
1.0.6 Dec 26, 2022
1.0.1 Jan 31, 2022

#987 in Command line utilities

Download history 45/week @ 2024-07-29 9/week @ 2024-09-16 31/week @ 2024-09-23 131/week @ 2024-10-28 13/week @ 2024-11-04

144 downloads per month

GPL-3.0-only

24KB
387 lines

Putzen

License: GPL v3 crates.io dependency status Build Status LOC

"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 <folder> [-v] [-d] [-y] [-L] [-a]

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
  -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
                    dive into hidden folders too, e.g. `.git`
  --help            display usage information

Alternative Projects

License

Dependencies

~3–11MB
~114K SLoC