Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm-cache: add page #14391

Merged
merged 3 commits into from
Oct 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions pages/common/npm-cache.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# npm cache

> Manage the npm package cache.
> More information: <https://docs.npmjs.com/cli/commands/npm-cache>.

- Add a specific package to the cache:

`npm cache add {{package_name}}`

- Remove a specific package from the cache:

`npm cache remove {{package_name}}`

- Clear a specific cached item by key:

`npm cache clean {{key}}`

- Clear the entire npm cache:

`npm cache clean --force`

- List the contents of the npm cache:

`npm cache ls`

- Verify the integrity of the npm cache:

`npm cache verify`

- Show information about the npm cache location and configuration:

`npm cache dir`

- Change the cache path:

`npm config set cache {{path/to/directory}}`