Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>Unused Dependencies CleanerNew to Visual Studio Code? Get it now.
Unused Dependencies Cleaner

Unused Dependencies Cleaner

ShadowCat

|
1 install
| (0) | Free
Detect and remove dependencies that are not used in your project.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Unused Dependencies Cleaner for VS Code

Remove dead npm dependencies faster. Unused Dependencies Cleaner scans your project, detects unused dependencies and devDependencies, and lets you remove them directly from the VS Code sidebar.

This extension is designed for JavaScript and TypeScript projects that want cleaner package.json files, smaller dependency surface, and easier maintenance.

Why Use Unused Dependencies Cleaner?

  • Find unused npm packages in seconds.
  • Reduce dependency bloat in package.json.
  • Clean up dependencies and devDependencies safely with confirmation.
  • Stay inside VS Code, no external CLI required.

Features

  • Scans root package.json.
  • Checks both:
    • dependencies
    • devDependencies
  • Recursively scans source files:
    • .js, .ts, .jsx, .tsx
  • Detects package usage from:
    • ES module imports: import ... from 'pkg'
    • CommonJS imports: require('pkg')
  • Ignores:
    • relative imports (./, ../, /)
    • node_modules, dist, build
    • @types/* imports (default MVP behavior)
  • Normalizes package names, including scoped packages.
  • Shows grouped results in Output Channel: Unused Dependencies Cleaner.
  • Provides one-click removal from sidebar tree items with confirmation.

Sidebar Experience

The extension adds a dedicated Activity Bar section:

  • Deps Cleaner
    • Unused Dependencies Cleaner view

Available actions:

  • Refresh scan
  • Open package.json
  • Remove selected unused dependency

How It Works

  1. Reads root package.json.
  2. Builds the list of declared dependencies.
  3. Scans project imports to build the list of used packages.
  4. Compares declared vs used.
  5. Displays unused packages grouped by dependency type.
  6. On removal, updates and saves package.json.

Quick Start

  1. Open a JavaScript/TypeScript project that contains a root package.json.
  2. Open Deps Cleaner in the Activity Bar.
  3. Click refresh in the view title.
  4. Review unused dependencies.
  5. Click a dependency to remove it, then confirm.

Notifications

You will see one of these messages after scanning:

  • No unused dependencies found
  • X unused dependencies found

Use Cases

  • Before opening a pull request.
  • Before publishing a package.
  • During dependency audits.
  • During refactoring or monolith cleanup.

Limitations (MVP)

  • Scans only the root package.json in the current workspace.
  • Minimal monorepo handling (root only).
  • Static import detection only (import / require).

Keywords

unused dependencies, dependency cleaner, npm cleanup, package.json cleanup, VS Code extension, JavaScript tooling, TypeScript tooling, devDependencies cleanup, remove unused packages

Development

npm install
npm run compile

Press F5 to launch the Extension Development Host.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft