ProjectCleaner (or pcleaner) is a command-line utility to quickly scan and clean build artifacts from multiple types of projects, including Flutter, Rust, and Node.js. It helps developers reclaim disk space and keep project directories tidy.
-
Automatically detects projects based on their configuration files:
pubspec.yaml→ Flutter projectsCargo.toml→ Rust projectspackage.json→ Node.js projects
-
Cleans build artifacts:
- Flutter: runs
flutter clean - Rust: runs
cargo clean - Node.js: deletes
node_modulesdirectory
- Flutter: runs
-
Supports dry-run mode to preview actions without deleting anything
-
Skips common large directories like
.git,.vscode,node_modules,target, andbuildduring scanning -
Interactive confirmation before deleting anything for safety
Clone the repository and build the binary:
git clone <repo-url>
cd pcleaner
go build -o pcleaner main.goAfter building, you can run the pcleaner binary from any directory.
./pcleaner [--dry-run]--dry-runScan the directory and show what would be cleaned without actually deleting any files.
# Dry run
./pcleaner --dry-run
# Actual cleanup
./pcleanerThe program will prompt for confirmation before performing any destructive actions.
| Project Type | Detection File | Cleanup Action |
|---|---|---|
| Flutter | pubspec.yaml | flutter clean |
| Rust | Cargo.toml | cargo clean |
| Node.js | package.json | Delete node_modules |
- Always use
--dry-runfirst if you are unsure what will be deleted. - The program will prompt for confirmation before performing destructive actions.
- Skipped directories include
.git,.vscode,node_modules,target, andbuild.