voidcosmos /npkill
Easily find and remove old and heavy node_modules 📦, artifacts, caches and dev leftovers 🧹
★ 9,517⑂ 264👁 39⑃ 155● 123▤ 33
+4
Daily
9,517
stars
264
forks
39
watchers
155
prs
123
issues
33
releases
README
Your system remembers everything. npkill helps you forget. This tool scans your system for heavy and unnecessary development directories. It shows you what is taking up space, when you stopped using it, why it’s there, and lets you remove it in seconds. Table of Contents - Features - Usage - Multi-Select Mode - Search - Profiles - .npkillrc - Options - Examples - JSON Output - Set Up Locally - API - Contributing - Buy us a coffee - License ✨ Features - Beyond node_modules Started with node_modules, extended to entire development environments. Remove build artifacts, caches, temp files, and other heavy leftovers using built-in or custom profiles. - Profiles-first scanning Scan your system using predefined profiles for Node.js, Python, Rust, game engines, and more. Or create your own to match your workflow. - Effortless by default A clean and responsive TUI designed to stay out of your way. See everything clearly, make decisions fast, and clean with confidence. - Workspace awareness See at a glance when you last worked in that workspace and find out if it's an active project or a long-forgotten one. - Built for speed npkill is written in TypeScript, but searches are performed at a low level, delivering blazing-fast performance and near-instant responsiveness. :clipboard: Usage Simply use the following command: bash $ npx npkill By default, npkill will start searching for node-related development directories from the directory where you ran it, using the built-in node profile. As the target directories are found, they will be listed for you. [!NOTE] TL;DR: You can learn everything as you go because the TUI explains itself. You can navigate between them with ↓ ↑, and use Space or Del to delete the selected folder. You can view more information about the result by pressing → and go back by pressing ←. If necessary, you can open the parent directory with o. You can see more navigation keys in the built-in quick reference panel. [!WARNING] Some applications installed on the system need their node_modules directory to work and deleting them may break them. npkill will try to identify them and highlight them by displaying a :warning: to be careful. [!IMPORTANT] npkill find candidates for deletion but does not decide what is safe for you. - Results are based on common conventions. - Whether a folder is safe to delete always depends on the scope. Always review results before deleting anything. :ballot_box_with_check: Multi-Select mode This mode allows you to select and delete multiple folders at once, making it more efficient when cleaning up many directories. Entering Multi-Select mode Press t to toggle multi-select mode. When active, you'll see a selection counter and additional instructions at the top of the results. Controls - Space: Toggle selection of the current folder. - v: Start/end range selection mode. - a: Toggle select/unselect all folders. - Enter: Delete a
Top issues
#188allow deletion without using TUI8 comments · 2024-07-16#172delete is too slow7 comments · 2023-10-25#186Desktop app?5 comments · 2024-07-01#220Add support for managing `node_modules/.ignored` folders separately in npkill1 comments · 2025-09-16#199npkill doesnt show node_modules in nested routes1 comments · 2025-07-13#121Performance Improvement1 comments · 2022-03-22#278Mutation tests: switch Stryker to its Jest runner (timeouts make the score read 100%)0 comments · 2026-11-03#263It does not run on Git bash console over Windows0 comments · 2026-08-07
Discussions
#283You made my day today :)0 comments · 2026-11-15#270Optional maintainer trial: regression testing one npkill workflow0 comments · 2026-09-26#206Proposal: Extend npkill beyond node_modules with developer profiles1 comments · 2025-07-29
Latest release
v1.0 - Because the problem is modern development. v1.0.0 2026-11-12npkill started in 2019 as a small script to hunt node_modules. Six years later, node_modules is only part of what piles up on a dev machine. Every framework and language leaves its own build outputs and caches behind. If you don't want to change anything, you don't have to. npx npkill works as always, it just finds a lot more. You can read all the details of this update in this post or watch the teaser (1:15). Added - Added profiles: sets of targets that represent a development ecosystem. The default one is node, which finds node_modules and also .next, .nuxt, .angular, .turbo and