Remove all node_modules folders from a directory
Project description
# 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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file npmnuke-0.2.1.tar.gz
.
File metadata
- Download URL: npmnuke-0.2.1.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3554e7336e9eefe1ef779c8cb54ce1a31788c751bde9fcbfb8fd64eb7c708933 |
|
MD5 | aab7b4516f809b0698aa42d884ecef45 |
|
BLAKE2b-256 | 58d1f19bc09c78fc491da3f6a7a7fd3211dbb1088416981912e3fc4d283a37cd |