pcpm store
Inspect and manage the global content-addressable store.
pcpm store <subcommand> [options]
pcpm store is a family of subcommands that manage the global
content-addressable store.
Subcommands
pcpm store status
Prints a summary of the store:
Store path: %LOCALAPPDATA%\pcpm\store
Layout version: v1
Packages: 4,231
Disk usage: 3.7 GB
Hardlinks out: 17,348
Use --json for a machine-readable form.
pcpm store path
Prints the absolute path of the store. Useful in scripts:
STORE=$(pcpm store path)
du -sh "$STORE"
pcpm store verify
Walks the store, recomputes the SHA-256 of every entry, and compares it to the recorded hash. Exits non-zero if any mismatch is found.
This is what pcpm doctor runs under the
store-integrity check.
pcpm store prune (reserved)
In a future release: walks the lockfile of the current workspace, and drops every store entry that no lockfile references. Today, this is a no-op that prints a message pointing to the manual recipe.
Manual prune
To manually shrink the store:
# 1. Find out what's referenced
pcpm list --json | jq -r '.[].hash' > /tmp/referenced-hashes.txt
# 2. Find what's on disk
find "$(pcpm store path)" -name 'pkg.nupkg' | sed 's|.*/store/v1/||;s|/pkg.nupkg||' > /tmp/store-hashes.txt
# 3. Show what would be removed
comm -23 <(sort /tmp/store-hashes.txt) <(sort /tmp/referenced-hashes.txt)
See also
- Content-addressable store — the design.
pcpm doctor— for one-off sanity checks.