Skip to main content
Version: 1.1.0

blobber cache

Manage the local blob cache.

Synopsis

blobber cache <subcommand> [flags]

Description

Blobber caches downloaded blobs locally to speed up repeated operations. The cache command provides subcommands to inspect and manage this cache.

Global Flags

The --no-cache flag on the root command bypasses caching entirely for a single operation:

blobber --no-cache pull ghcr.io/myorg/config:v1 ./output

Cache Subcommand Flags

These flags apply to all cache subcommands:

FlagTypeDefaultDescription
--dirstring~/.cache/blobberCache directory path

cache info

Show cache statistics.

Synopsis

blobber cache info [flags]

Flags

FlagTypeDefaultDescription
-l, --longboolfalseShow detailed entry information

Output

Short format:

Cache: /home/user/.cache/blobber
Size: 150 MB (157286400 bytes)
Entries: 3

Long format (-l):

Cache: /home/user/.cache/blobber
Size: 150 MB (157286400 bytes)
Entries: 3

DIGEST SIZE LAST ACCESSED COMPLETE
sha256:a1b2c3d4e5f6789... 50 MB 1 hour ago yes
sha256:b2c3d4e5f6789a0... 50 MB 30 min ago yes
sha256:c3d4e5f6789a0b1... 50 MB 5 min ago yes

Examples

blobber cache info
blobber cache info --long
blobber cache info --dir /custom/cache

cache clear

Remove all cached blobs.

Synopsis

blobber cache clear [flags]

Flags

FlagTypeDefaultDescription
-y, --yesboolfalseSkip confirmation prompt

Output

Without --yes, prompts for confirmation:

This will remove 3 entries (150 MB) from the cache. Continue? [y/N]

On success:

Cleared 3 entries (150 MB)

If already empty:

Cache is already empty

Examples

blobber cache clear
blobber cache clear --yes

cache prune

Remove old or excess cache entries.

Synopsis

blobber cache prune [flags]

Flags

FlagTypeDefaultDescription
--max-sizestringMaximum cache size (e.g., 1GB, 500MB)
--max-agestringMaximum entry age (e.g., 24h, 7d)

At least one of --max-size or --max-age is required.

Size Format

  • 500MB, 1GB, 100KB
  • Case-insensitive

Age Format

  • s - seconds
  • m - minutes
  • h - hours
  • d - days

Examples: 30m, 24h, 7d, 1h30m

Output

Removed 2 entries (100 MB)
Remaining: 1 entry (50 MB)

If nothing to prune:

No entries to prune

Pruning Order

  1. Entries exceeding --max-age are removed first
  2. Remaining entries are evicted LRU (least recently used) until under --max-size

Examples

Remove entries older than 7 days:

blobber cache prune --max-age 7d

Keep cache under 1GB:

blobber cache prune --max-size 1GB

Combine both:

blobber cache prune --max-age 24h --max-size 500MB

Cache Location

Default: $XDG_CACHE_HOME/blobber (typically ~/.cache/blobber)

The cache location follows the XDG Base Directory Specification. Override with:

  • --dir flag on cache subcommands
  • cache.dir in config file
  • BLOBBER_CACHE_DIR environment variable

Structure:

~/.cache/blobber/
├── blobs/
│ └── sha256/
│ └── <digest> # Cached blob data
└── entries/
└── sha256/
└── <digest>.json # Entry metadata

See Also