Skip to main content

# npmnuke 💥

> A simple script to remove all node_modules folders in a directory

## Description

My PC had a lot of old web projects that I didn’t use anymore, but they were taking up a lot of space. Manually deleting all the node_modules folders was a pain, so I wrote this script to do it for me.

By defaul script will ignore folders that start with a dot (.git, .vscode, etc.) and folders that contain a .npmnukeignore file. You can also specify your own ignore file with the –ignore-file option or modify .nmpnukeignore in your home directory.

## Future plans

  • [x] Add new UI using https://github.com/Textualize/textual

  • [ ] Somehow make it detect monorepos and combine search results for them

  • [ ] Add last modified date to search results

  • [ ] Add option to open search results in file manager

## Installation

`bash pip install npmnuke `

## Usage

`bash npmnuke [directory] (options) `

## Options

  • –dry-run - Show which folders would be deleted without actually deleting them

  • –ignore-file - Path to the ignore file, by default .npmnukeignore in home directory is used

  • –disable-ignore - Do not use the .npmnukeignore file when scanning for node_modules folders.

  • –ignore-dot [true | false] - Ignore dot folders (.vscode/ .git/ etc.), by default True

  • –verbose - Show verbose output

  • –help - Show help

Release files for npmnuke 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for npmnuke 0.2.1
File Size Uploaded
npmnuke-0.2.1.tar.gz 12.2 kB Details

Release files / npmnuke-0.2.1.tar.gz

Download URL npmnuke-0.2.1.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3554e7336e9eefe1ef779c8cb54ce1a31788c751bde9fcbfb8fd64eb7c708933
BLAKE2b-256 checksum
How to use checksums
58d1f19bc09c78fc491da3f6a7a7fd3211dbb1088416981912e3fc4d283a37cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file

0.2.0

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page