---
name: "singularity-cache-clean"
section: "1"
platform: "linux"
package: "apptainer"
version: "1.5.4-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/singularity-cache-clean"
---

# singularity-cache-clean(1)

Clean your local Apptainer cache

## NAME

apptainer-cache-clean - Clean your local Apptainer cache

## SYNOPSIS

**apptainer cache clean \[clean options...\]**

## DESCRIPTION

This will clean your local cache (stored at $HOME/.apptainer/cache if\
   APPTAINER\_CACHEDIR is not set). By default the entire cache is cleaned, use\
   \--days and --type flags to override this behavior. Note: if you use Apptainer\
   as root, cache will be stored in '/root/.apptainer/.cache', to clean that\
   cache, you will need to run 'cache clean' as root, or with 'sudo'.

## OPTIONS

**-D**, **--days**=0\
 	remove all cache entries older than specified number of days

**-n**, **--dry-run**\[=false\]\
 	operate in dry run mode and do not actually clean the cache

**-f**, **--force**\[=false\]\
 	suppress any prompts and clean the cache

**-h**, **--help**\[=false\]\
 	help for clean

**-T**, **--type**=\[all\]\
 	a list of cache types to clean (possible values: library, oci, shub, blob, net, oras, all)

## EXAMPLE

```
  All group commands have their own help output:
  $ apptainer help cache clean --days 30
  $ apptainer help cache clean --type=library,oci
  $ apptainer cache clean --help
```

## SEE ALSO

**[apptainer-cache(1)](/apptainer-cache/1.md)**

## HISTORY

22-Sep-2026 Auto generated by spf13/cobra
