"putzen" is German and means cleaning. It helps keeping your disk clean of build and dependency artifacts safely.
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).
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
To install the putzen
, you just need to run
bash
cargo install --force putzen-cli
(--force just makes it update to the latest putzen
if it's already installed)
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
sh
$HOME/.cargo/bin/putzen
```sh $ putzen --help
Usage: putzen
help keeping your disk clean of build and dependency artifacts
Positional Arguments: folder path of where to start with disk clean up.
Options:
-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
```