Linux command
apptainer-cache 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List all cached images
apptainer cache list
List cached images with details
apptainer cache list -v
List only OCI cached images
apptainer cache list -T oci
Clean all cached images
apptainer cache clean
Clean cache without confirmation
apptainer cache clean -f
Clean cache entries older than 30 days
apptainer cache clean -D 30
Dry run to see what would be cleaned
apptainer cache clean -n
说明
apptainer cache manages the local Apptainer container image cache. When pulling or building containers, Apptainer stores intermediate images and layers locally to speed up subsequent operations. This command allows listing cache contents and cleaning up disk space. The cache is stored at $HOME/.apptainer/cache by default, or at the path specified by the APPTAINER_CACHEDIR environment variable.
参数
- -T, --type _strings_
- Limit operation to specific cache types: library, oci, shub, blob, net, oras, all (default: all)
- -v, --verbose
- Display detailed information about cached images (list only)
- -D, --days _int_
- Remove cache entries older than the specified number of days (clean only)
- -n, --dry-run
- Show what would be deleted without actually removing anything (clean only)
- -f, --force
- Suppress confirmation prompts and clean immediately (clean only)
FAQ
What is the apptainer-cache command used for?
apptainer cache manages the local Apptainer container image cache. When pulling or building containers, Apptainer stores intermediate images and layers locally to speed up subsequent operations. This command allows listing cache contents and cleaning up disk space. The cache is stored at $HOME/.apptainer/cache by default, or at the path specified by the APPTAINER_CACHEDIR environment variable.
How do I run a basic apptainer-cache example?
Run `apptainer cache list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -T, --type _strings_ do in apptainer-cache?
Limit operation to specific cache types: library, oci, shub, blob, net, oras, all (default: all)