The rules database is thirteen rules. That is the whole of what Diskern
knows:
chrome-cache · firefox-cache · pip-cache · rust-target · node-modules
unix-system-logs · macos-user-logs · windows-crash-logs
installer-packages · temp-dirs
windows-driverstore · windows-winsxs · windows-installer-cache
Everything else on a disk classifies as unknown, and report::build
drops those — so for most people, most of what is actually eating their
space is invisible.
This is the contribution that needs the most people and the least
Rust. A rule is JSON:
{
"id": "npm-cache",
"patterns": ["**/.npm/_cacache/**", "**/appdata/local/npm-cache/**"],
"category": "package_manager_cache",
"verdict": "safe",
"description": "npm's download cache. Re-fetched on demand; removing it costs one slower install."
}
Things worth having, if you know where they live on your platform:
- package managers — npm/pnpm/yarn, Go module cache, Gradle, Maven, Composer, NuGet, Homebrew
- browsers — Edge, Safari, Brave, Chromium variants
- creative apps with enormous caches — Adobe, DaVinci, Blender
- IDEs — JetBrains, VS Code workspace storage, Xcode DerivedData
- containers — Docker/Podman overlay and build caches
Read docs/RULES.md first — especially the
part on why review is the safer default and why rule order is a
safety property. The important rule about rules: safe means the user
loses nothing but time. If removing it loses state, history, licences or
credentials, it is review at most.
One rule per PR is perfect. A test in rules.rs showing the path you
mean to match, and one nearby path you mean not to match, makes it
easy to accept.
crates/diskern-core/rules/base.json
The rules database is thirteen rules. That is the whole of what Diskern
knows:
Everything else on a disk classifies as
unknown, andreport::builddrops those — so for most people, most of what is actually eating their
space is invisible.
This is the contribution that needs the most people and the least
Rust. A rule is JSON:
{ "id": "npm-cache", "patterns": ["**/.npm/_cacache/**", "**/appdata/local/npm-cache/**"], "category": "package_manager_cache", "verdict": "safe", "description": "npm's download cache. Re-fetched on demand; removing it costs one slower install." }Things worth having, if you know where they live on your platform:
Read docs/RULES.md first — especially the
part on why
reviewis the safer default and why rule order is asafety property. The important rule about rules:
safemeans the userloses nothing but time. If removing it loses state, history, licences or
credentials, it is
reviewat most.One rule per PR is perfect. A test in
rules.rsshowing the path youmean to match, and one nearby path you mean not to match, makes it
easy to accept.
crates/diskern-core/rules/base.json