resq-cleanup-0.1.10 is not a library.
resq-clean — Build Artifact Cleaner
Removes gitignored build artifacts and generated files from the monorepo while preserving negated patterns and .env files. Uses the ignore crate for full .gitignore semantics and provides an interactive TUI for visual cleanup.
Build
# Build from workspace root
Binary: target/release/resq-clean
Usage
# Interactive TUI (default)
# Preview what would be deleted without removing anything
How It Works
- Walks the repository tree starting from the project root
- Applies
.gitignorerules via theignorecrate (full support for negated patterns, nested.gitignorefiles,.git/info/exclude) - Identifies files and directories that are gitignored
- Processes entries depth-first (children before parents) so directories only get removed after their contents are gone
- Always preserves
.envfiles regardless of gitignore rules
Safety rules:
.envfiles are never deleted (even if gitignored) — they contain local credentials- Negated patterns (
!important-file) keep matching files safe - Dry-run is the recommended first step
What Gets Deleted
Anything gitignored, which typically includes:
target/ # Rust build output
node_modules/ # npm/bun dependencies
.next/ # Next.js build cache
dist/ # TypeScript/Bun build output
build/ # C++ CMake build dirs
__pycache__/ # Python bytecode
*.pyc
.pytest_cache/
*.o *.a *.so # C++ object files
*.nettrace # .NET profiling traces
flamegraph.svg # Generated profiles
scripts/out/ # Dependency cost reports
Files matching negated gitignore entries (e.g. !dist/keep-this.json) are preserved.
Flags
| Flag | Description |
|---|---|
--dry-run |
Print what would be deleted without deleting anything |
--verbose |
Print each file/directory as it is deleted |
Example Output
$ cleanup --dry-run
Would delete: services/infrastructure-api/target/
Would delete: services/coordination-hce/node_modules/
Would delete: services/web-dashboard/.next/
Would delete: libs/cpp/resq-common/build/
Would delete: services/intelligence-pdie/__pycache__/
5 items would be removed (2.4 GB)
$ cleanup --verbose
Deleted: services/infrastructure-api/target/debug/build/
Deleted: services/infrastructure-api/target/debug/deps/
...
Deleted: services/infrastructure-api/target/
Done. Removed 847 items (2.4 GB freed)
When to Use
- Before committing to ensure no build artifacts slip through
- After switching branches to avoid stale build caches
- Periodic deep clean when disk space is low
For a lighter clean, use the individual ecosystem commands: