{"id":21158282,"url":"https://github.com/simbo/rm-node_modules","last_synced_at":"2026-04-28T19:04:18.524Z","repository":{"id":141795997,"uuid":"326056635","full_name":"simbo/rm-node_modules","owner":"simbo","description":"A shell script to find and delete all node_modules directories recursively within a given path.","archived":false,"fork":false,"pushed_at":"2021-01-02T20:41:19.000Z","size":555,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-31T08:21:41.955Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simbo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-01T21:11:26.000Z","updated_at":"2025-01-08T19:31:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"06eba6ee-8fd4-4457-b9bc-7aadb4f099bc","html_url":"https://github.com/simbo/rm-node_modules","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/simbo/rm-node_modules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simbo%2Frm-node_modules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simbo%2Frm-node_modules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simbo%2Frm-node_modules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simbo%2Frm-node_modules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simbo","download_url":"https://codeload.github.com/simbo/rm-node_modules/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simbo%2Frm-node_modules/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32394494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T12:19:30.652Z","updated_at":"2026-04-28T19:04:18.482Z","avatar_url":"https://github.com/simbo.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"rm-node_modules\n===============\n\n\u003e A shell script to find and delete all node_modules directories recursively\n\u003e within a given path.\n\n[![GitHub Release](https://img.shields.io/github/v/release/simbo/rm-node_modules)](https://github.com/simbo/rm-node_modules/releases)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/simbo/rm-node_modules/CI/master)](https://github.com/simbo/rm-node_modules/actions?query=workflow%3ACI)\n![Pure Bash Script](https://img.shields.io/badge/pure-bash-green)\n\n---\n\n\u003c!-- TOC anchorMode:github.com --\u003e\n\n- [About](#about)\n- [Requirements](#requirements)\n- [Install and Update](#install-and-update)\n  - [Installing manually](#installing-manually)\n- [Usage](#usage)\n  - [Examples](#examples)\n  - [Configure default Behavior](#configure-default-behavior)\n- [FAQ](#faq)\n  - [Why not use a Oneliner?](#why-not-use-a-oneliner)\n  - [Could you add support for Windows Command Prompt?](#could-you-add-support-for-windows-command-prompt)\n- [Screenshots](#screenshots)\n  - [Default Output](#default-output)\n  - [Output with Disk Usage](#output-with-disk-usage)\n- [License and Author](#license-and-author)\n\n\u003c!-- /TOC --\u003e\n\n---\n\n## About\n\nWorking with [node.js](https://nodejs.org/) projects for some time, your disk\nwill be filled with `node_modules` directories taking up quite some space.\n\n*rm-node_modules* finds them, lists them and deletes them in a quick and\nconvenient way, while optionally determining the potentially freed disk space.\n\n## Requirements\n\n*rm-node_modules* should work with every **Linux** or **Mac** platform where\n*bash* is available.  \n(Although, bash doesn't have to be your default shell.)\n\nIf you experience any problems, please [create an issue](https://github.com/simbo/rm-node_modules/issues).\n\n## Install and Update\n\nTo install and/or update the latest version, simply run the following command:\n\n```sh\nbash \u003c(curl -so- https://raw.githubusercontent.com/simbo/rm-node_modules/master/install)\n```\n\nThis will install the latest release of `rm-node_modules` to `$HOME/bin`.\n\nAfterwards, you can run the script using `rm-node_modules` or `rmnm`.\n\n### Installing manually\n\nDownload [./rm-node_modules](https://raw.githubusercontent.com/simbo/rm-node_modules/master/rm-node_modules)\nand put it anywhere you want.\n\nMake sure, it's within your `$PATH`.\n\nMake it executable: `chmod +x ./rm-node_modules`\n\nAnd optionally link it with a short alias: `ln -s ./rm-node_modules rmnm`\n\n## Usage\n\n```txt\nUsage:  rmnm [-yuv] [-d \u003cDIR\u003e | -c \u003cDIR\u003e]\n\n\"Search for node_modules directories within given path and delete them.\"\n\nOptions:\n  -d \u003cDIR\u003e  directory to search within\n            (default: current directory or configured default directory)\n  -y        delete without confirmation\n  -u        determine disk usage; enable by default when using together with -c\n  -c \u003cDIR\u003e  configure default directory to search within\n  -v        display version info only\n```\n\n### Examples\n\n```sh\n# run within configured default directory or current working directory\nrmnm\n# run within current working directory\nrmnm -d .\n# run with displaying disk usage\nrmnm -u\n# run with auto-confirming deletion\nrmnm -y\n# run with auto-confirming deletion and displaying disk usage\nrmnm -uy\n# run within ~/projects\nrmnm -d ~/projects\n# run within ~/projects and displaying disk usage\nrmnm -u -d ~/projects\n# run within ~/projects, display disk usage and auto-confirm deletion\nrmnm -uy -d ~/projects\n```\n\n### Configure default Behavior\n\nYou can optionally configure default behavior, which will be saved to\n`$HOME/.rm-node_modules-defaults`.\n\n```sh\n# usage:\nrmnm -c \u003cDIR\u003e [-u]\n\n# set a default base directory and disable determining disk usage by default:\nrmnm -c ~/projects\n\n# set a default base directory and enable determining disk usage by default:\nrmnm -c ~/projects -u\n```\n\nIf no default directory is configured and no directory is given via the `-d`\noption, the current working directory will be used.\n\n## FAQ\n\n### Why not use a Oneliner?\n\nThere are oneliners like the following known in the node.js world, which find\nand delete node_modules directories within the current path:\n\n```sh\nfind . -name \"node_modules\" -type d -prune -exec rm -rf '{}' +\n```\n\nAlthough, this is a quite simple way to achieve almost the same outcome, there\nare some downsides:\n\n  - **You may destroy some of your applications!**  \n    Running a command like this in the wrong place, may break some of your apps\n    (e.g. vscode plugins, chrome apps or the yarn cache).  \n    *rm-node_modules* will warn you, when you are using the script for\n    example with your home directory as base directory.\n\n  - **You won't know beforehand what directories are affected!**  \n    Again, you might delete or destroy things accidentally.  \n    *rm-node_modules* will list affected directories and wait for your\n    confirmation before removing them.\n\n### Could you add support for Windows Command Prompt?\n\n**No.**  \nGet a real shell for f@#k's sake.\n\n## Screenshots\n\n### Default Output\n\n![rm-node_modules default output](./screenshot-default.png)\n\n### Output with Disk Usage\n\n![rm-node_modules with disk usage](./screenshot-disk-usage.png)\n\n## License and Author\n\n[MIT \u0026copy; Simon Lepel](http://simbo.mit-license.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimbo%2Frm-node_modules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimbo%2Frm-node_modules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimbo%2Frm-node_modules/lists"}