snapdir flush-cache

Flush the local cache.

flush-cache removes cached objects and manifests from the local cache, reclaiming disk space. Snapshots pushed to a store are unaffected and can be fetched again.

Usage

snapdir flush-cache [OPTIONS]

Options

flush-cache takes no positional arguments.

Option Description
--store <URI> Store URI accepted by the cache-management surface. Env: SNAPDIR_STORE.
--id <ID> Snapshot ID to operate on.
--cache-dir <DIR> Directory where the object cache is stored. Env: SNAPDIR_CACHE_DIR.
--purge Purge objects with invalid checksums.
--force Force an action to run.
--dryrun Preview what would be removed without deleting it.
-q, --quiet / --no-progress / --color <WHEN> / --verbose Universal output-control options.

Examples

Flush the default cache:

snapdir flush-cache

Preview a flush of a specific cache directory without deleting anything:

snapdir flush-cache --cache-dir /var/snapdir/cache --dryrun

See also