Skip to content
ufraan
← Back

Nmclean

CLI to scan, size, and interactively delete node_modules directories.

GoCLI
Mar 2026GitHubLive

My laptop was running out of disk space and I traced it to a graveyard of abandoned node_modules folders. So I wrote a CLI tool in Go that finds and manages them across your filesystem. It recursively scans directories to find all node_modules folders, calculates their sizes, and presents them in an interactive TUI where you can browse results, preview what would be deleted, and confirm removal. A dry-run mode lets you see the impact before committing to anything.

Interactive TUI showing node_modules sizes
Interactive TUI showing node_modules sizes

Written in Go for fast, native execution with no runtime dependencies, the tool uses recursive directory traversal and filesystem walks to calculate directory sizes. The interactive terminal UI provides a navigable list with size information and confirmation prompts for safe deletion.