New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

npm-cache-rm

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-cache-rm

remove entries from npm cache

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
increased by11.04%
Maintainers
1
Weekly downloads
 
Created
Source

npm-cache-rm

Removes entries from the npm cache

Usage

npm-cache-rm [--dry-run] <regex>

removes any entry that matches .

Example

List entries that match "electron"

npm-cache-rm --dry-run electron

result

rm make-fetch-happen:request-cache:https://registry.npmjs.org/electron-publish/-/electron-publish-22.3.2.tgz
rm pacote:tag-manifest:https://registry.npmjs.org/electron/-/electron-10.0.0.tgz:sha512-0XX/LqYAHHCSbfLjUk9VRDPOeYjDPEzA9i7F50AqpEpFIWR2bp++0S0beRANUpPdkvtBDp+0R6vHV3iXPvuKyA==
rm make-fetch-happen:request-cache:https://registry.npmjs.org/electron/-/electron-10.0.0.tgz
rm make-fetch-happen:request-cache:https://registry.npmjs.org/electron-download/-/electron-download-4.1.1.tgz
rm pacote:tag-manifest:https://registry.npmjs.org/electron/-/electron-9.2.0.tgz:sha512-4ecZ3rcGg//Gk4fAK3Jo61T+uh36JhU6HHR/PTujQqQiBw1g4tNPd4R2hGGth2d+7FkRIs5GdRNef7h64fQEMw==
rm make-fetch-happen:request-cache:https://registry.npmjs.org/electron-context-menu/-/electron-context-menu-2.3.0.tgz

Remove Electron 10.0.0

npm-cache-rm "electron.*?10\.0\.\0"

Disclaimer, Notes

I'm not a node expert but it worked for me. I wanted to be able to test some issues I'm running into with packages without clearing the entire cache so I threw this together. I also wanted to keep the dependencies low so I didn't add a bunch of libraries for globing or argument parsing etc...

Licence: MIT

Keywords

FAQs

Package last updated on 22 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc