← 返回命令列表

Linux command

bun-pm-cache 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Print

bun pm cache

Clear

bun pm cache rm

说明

bun pm cache manages Bun's global module cache directory where all packages downloaded from npm registries are stored. Running without arguments prints the absolute path to the cache directory. The rm subcommand deletes the entire cache contents. The default cache location is ~/.bun/install/cache, where packages are stored in subdirectories named \${name}@\${version}. When bun install runs, it checks this global cache first and uses cached copies via hardlink, clonefile, or copy instead of fetching from the network. The cache location can be overridden via the BUN_INSTALL_CACHE_DIR environment variable or the install.cache section in bunfig.toml.

FAQ

What is the bun-pm-cache command used for?

bun pm cache manages Bun's global module cache directory where all packages downloaded from npm registries are stored. Running without arguments prints the absolute path to the cache directory. The rm subcommand deletes the entire cache contents. The default cache location is ~/.bun/install/cache, where packages are stored in subdirectories named \${name}@\${version}. When bun install runs, it checks this global cache first and uses cached copies via hardlink, clonefile, or copy instead of fetching from the network. The cache location can be overridden via the BUN_INSTALL_CACHE_DIR environment variable or the install.cache section in bunfig.toml.

How do I run a basic bun-pm-cache example?

Run `bun pm cache` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more bun-pm-cache examples?

This page includes 2 examples for bun-pm-cache, plus related commands for nearby Linux tasks.