← 返回
内容创作 中文

NPkill

Clean up node_modules and .next folders to free up disk space using npkill. Specifically designed to help JavaScript and Next.js developers remove accumulated build artifacts that consume significant storage. Provides both interactive and automated cleanup options with safety checks to protect important system directories.
使用 npkill 清理 node_modules 和 .next 文件夹以释放磁盘空间。专为 JavaScript 和 Next.js 开发者设计,用于删除占用大量存储的构建缓存。提供交互式和自动清理选项,并设有安全检查以保护重要系统目录。
ashirbadgudu
内容创作 clawhub v1.0.1 1 版本 99740 Key: 无需
★ 0
Stars
📥 2,685
下载
💾 0
安装
1
版本
#latest

概述

NPkill - Node.js and Next.js Build Artifact Cleaner

This skill leverages the npkill tool to clean up node_modules and .next folders that accumulate over time from JavaScript and Next.js development, freeing up significant disk space.

Purpose

This skill addresses a common problem faced by JavaScript and Next.js developers: accumulation of large build artifact folders (node_modules, .next) that consume significant disk space over time. It provides a safe and efficient way to identify and remove these unnecessary folders.

When to Use This Skill

Use this skill when:

  • Your disk space is running low due to accumulated node_modules folders
  • You want to clean up old Next.js build artifacts (.next folders)
  • You need to maintain a clean development environment
  • You want to identify which projects are consuming the most disk space
  • You want to perform regular maintenance on your development workspace

Core Commands

Interactive Cleanup (Recommended)

npkill

Launches the interactive interface to browse and selectively delete node_modules folders. This is the safest method as it allows you to review each folder before deletion.

Target .next Folders Specifically

npkill --target .next

Search specifically for .next folders (used by Next.js projects) instead of node_modules.

Dry Run (Always Recommended First)

npkill --dry-run

Simulates the operation without actually deleting anything. Shows what would be deleted.

Automated Cleanup (Use with Caution)

npkill --delete-all --yes

Automatically deletes all node_modules folders found. Use only after verifying with dry-run.

View Sizes in Gigabytes

npkill --gb

Shows folder sizes in gigabytes instead of megabytes for easier reading.

Scan from Specific Directory

npkill --directory /path/to/search/from

Starts searching from a specific directory instead of current directory.

Safety Features

  • Warnings for Protected Directories: npkill highlights system/app directories that shouldn't be deleted with a ⚠️ symbol
  • Interactive Confirmation: Manual selection required in interactive mode
  • Dry-run Option: Preview changes before executing any deletions
  • Exclusion Options: Ability to exclude specific directories from scanning

Common Use Cases for Next.js Developers

Clean .next Folders Safely

# First, preview what would be deleted
npkill --target .next --dry-run

# Then, if satisfied with the preview, run interactively
npkill --target .next

Regular Maintenance

# Run interactive cleanup to review and selectively delete
npkill

Check Disk Usage

# View all node_modules folders sorted by size
npkill --sort=size

Best Practices

  1. Always run with --dry-run first to see what would be deleted
  2. Review warnings carefully about protected directories marked with ⚠️
  3. Use interactive mode for safer selective deletion
  4. Consider excluding important project directories using --exclude if needed
  5. Schedule regular cleanup to prevent massive accumulation

Installation Requirements

This skill requires the npkill CLI tool to be installed globally:

npm install -g npkill

Limitations

  • Requires npkill to be installed separately
  • May not detect all protected system directories in all environments
  • Interactive mode requires terminal with arrow key support

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-28 14:14 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,144
content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 857 📥 199,422
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,433