snippetbashTip
npm cache — Manage the npm package cache. More information: <https://docs.npmjs.com/cli/npm-cache/>.
Viewed 0 times
thecommandnpmcacheclimanagepackagenpm cache
Problem
How to use the
npm cache command: Manage the npm package cache. More information: <https://docs.npmjs.com/cli/npm-cache/>.Solution
npm cache — Manage the npm package cache. More information: <https://docs.npmjs.com/cli/npm-cache/>.Add a specific package to the cache:
npm cache add {{package_name}}Clear a specific cached item by key:
npm cache clean {{key}}Clear the entire npm cache:
npm cache clean {{[-f|--force]}}List cached packages:
npm cache lsList cached packages matching a specific name and version:
npm cache ls {{name}}@{{version}}Verify the integrity of the npm cache:
npm cache verifyList all entries in the npx cache:
npm cache npx lsCode Snippets
Add a specific package to the cache
npm cache add {{package_name}}Clear a specific cached item by key
npm cache clean {{key}}Clear the entire npm cache
npm cache clean {{[-f|--force]}}List cached packages
npm cache lsList cached packages matching a specific name and version
npm cache ls {{name}}@{{version}}Context
tldr-pages: common/npm cache
Revisions (0)
No revisions yet.