Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (unused-dependencies-remover) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
๐งน unused-dependencies-remover
A developer's spring cleaning CLI tool that detects and removes unused files and code from your projects.

Features
- ๐ Smart Detection: Identifies unused images, styles, components, and code
- ๐งช Safe Cleanup: Provides confidence scores and interactive confirmation before removal
- ๐ Detailed Reports: Generates comprehensive reports in JSON or Markdown
- ๐ก๏ธ Git Safety: Option to only clean files that are committed to git
- ๐ง Configurable: Exclude patterns, confidence thresholds, and more
Installation
# Install globally
npm install -g unused-dependencies-remover
# Or run directly with npx
npx unused-dependencies-removerUsage
Basic Scanning
# Scan the current directory
unused-dependencies-remover
# Scan a specific directory
unused-dependencies-remover --path ./my-projectCleanup Options
# Dry run (simulate cleanup without removing files)
unused-dependencies-remover --dry-run
# Interactive cleanup (with confirmation)
unused-dependencies-remover --clean
# Non-interactive cleanup (use with caution!)
unused-dependencies-remover --clean --no-interactiveFiltering
# Only scan specific types
unused-dependencies-remover --only "images,styles"
# Exclude specific patterns
unused-dependencies-remover --exclude "test/**,*.spec.js,assets/vendor/**"Reporting
# Generate a Markdown report
unused-dependencies-remover --report cleanup-report.md
# Generate a JSON report
unused-dependencies-remover --report cleanup-report.jsonAdvanced Options
# Set confidence threshold (default: 70%)
unused-dependencies-remover --threshold 80
# Git safety mode (only suggest committed files)
unused-dependencies-remover --git-safe
# Custom ignore file
unused-dependencies-remover --ignore-file .mycleanupignoreConfiguration
You can create a .cleanupignore file in your project root to specify patterns to ignore:
# Ignore these patterns
dist/**
build/**
node_modules/**
**/*.min.js
assets/required/**Example Output
๐งน unused-dependencies-remover โ A Developer's Spring Cleaning CLI Tool
v0.1.0
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Scan Results:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ผ๏ธ Images & Media:
โ
assets/old-logo.png (95%)
โ
assets/unused-image.jpg (90%)
โ assets/background.png (65%)
๐จ Style Files:
โ
styles/unused.css (85%)
โ
styles/temp.scss (90%)
๐ Scripts:
โ
utils/deprecated.js (95%)
โ components/test.js (60%)
๐ Summary:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
5 files can likely be removed
3 unused exports detected
2 items below confidence threshold (70%)
๐ก Tip: Run with --clean to remove items, or --report report.md to save findings.License
MIT