anchorectl archive

Archive rule and image operations.

Every command on this page also accepts the global flags.

Subcommands

archive image

Archive image related operations.

anchorectl archive image [command]

Subcommands

archive image add

Archive images.

anchorectl archive image add IMAGE_DIGESTS [flags]

Arguments

ArgumentDescription
IMAGE_DIGESTSList of image digests to archive.

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.

archive image delete

Performs a synchronous archive deletion.

anchorectl archive image delete IMAGEDIGEST [flags]

Aliases: del

Arguments

ArgumentDescription
IMAGEDIGESTImage digest to delete from archive.

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
--forceboolANCHORECTL_ARCHIVE_IMAGE_FORCEfalseNoForce archive image deletion.
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.

archive image get

Returns the archive metadata record identifying the image and tags for the analysis in the archive.

anchorectl archive image get IMAGE_DIGEST [flags]

Arguments

ArgumentDescription
IMAGE_DIGESTThe image digest to identify the image analysis.

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.

archive image list

List archived images.

anchorectl archive image list [flags]

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.

archive image restore

Creates a new analysis task that is executed asynchronously.

anchorectl archive image restore DIGEST [flags]

Arguments

ArgumentDescription
DIGESTThe image digest identify the analysis. Archived analyses are based on digest, tag records are restored as analysis is restored.

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
--forceboolANCHORECTL_ARCHIVE_IMAGE_FORCEfalseNoOverride any existing entry in the system.
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.

archive rule

Archive rule related operations.

anchorectl archive rule [command]

Subcommands

archive rule add

Add an analysis archive rule.

anchorectl archive rule add [flags]

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
--transitionstringANCHORECTL_ARCHIVE_RULE_TRANSITION""YesThe type of transition to make. If “archive”, then archive an image from the working set and remove it from the working set. If “delete”, then match against archived images and delete from the archive if match. Allowable values: archive, delete.
--analysis-age-daysintANCHORECTL_ARCHIVE_RULE_ANALYSIS_AGE_DAYS0NoMatches if the analysis is strictly older than this number of days.
--exclude-expiration-daysintANCHORECTL_ARCHIVE_RULE_EXCLUDE_EXPIRATION_DAYS0NoHow long the image selected will be excluded from the archive transition.
--exclude-last-seen-in-daysintANCHORECTL_ARCHIVE_RULE_EXCLUDE_LAST_SEEN_IN_DAYS0NoExclude image from archive if last seen in inventory within defined number of days.
--exclude-selector-registrystringANCHORECTL_ARCHIVE_RULE_EXCLUDE_SELECTOR_REGISTRY""NoThe registry section of a pull string. e.g. with “docker.io/anchore/anchore-engine:latest”, this is “docker.io”.
--exclude-selector-repositorystringANCHORECTL_ARCHIVE_RULE_EXCLUDE_SELECTOR_REPOSITORY""NoThe repository section of a pull string. e.g. with “docker.io/anchore/anchore-engine:latest”, this is “anchore/anchore-engine”.
--exclude-selector-tagstringANCHORECTL_ARCHIVE_RULE_EXCLUDE_SELECTOR_TAG""NoThe tag-only section of a pull string. e.g. with “docker.io/anchore/anchore-engine:latest”, this is “latest”.
-i, --inputstringANCHORECTL_INPUT""NoPath to a JSON input file or - to read from stdin.
--max-images-per-accountintANCHORECTL_ARCHIVE_RULE_MAX_IMAGES_PER_ACCOUNT0NoThis is the maximum number of image analyses an account can have. Can only be set on system_global rules.
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.
--rule-idstringANCHORECTL_ARCHIVE_RULE_RULE_ID""NoUnique identifier for archive rule.
--selector-registrystringANCHORECTL_ARCHIVE_RULE_SELECTOR_REGISTRY*NoThe registry section of a pull string. e.g. with “docker.io/anchore/anchore-engine:latest”, this is “docker.io”.
--selector-repositorystringANCHORECTL_ARCHIVE_RULE_SELECTOR_REPOSITORY*NoThe repository section of a pull string. e.g. with “docker.io/anchore/anchore-engine:latest”, this is “anchore/anchore-engine”.
--selector-tagstringANCHORECTL_ARCHIVE_RULE_SELECTOR_TAG*NoThe tag-only section of a pull string. e.g. with “docker.io/anchore/anchore-engine:latest”, this is “latest”.
--system-globalboolANCHORECTL_ARCHIVE_RULE_SYSTEM_GLOBALfalseNoTrue if the rule applies to all accounts in the system. This is only available to admin users to update/modify, but all users with permission to list rules can see them.
--tag-versions-newerintANCHORECTL_ARCHIVE_RULE_TAG_VERSIONS_NEWER0NoNumber of images mapped to the tag that are newer.

archive rule delete

Delete an analysis archive rule.

anchorectl archive rule delete ID [flags]

Aliases: del

Arguments

ArgumentDescription
IDThe rule id.

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.

archive rule get

Get an analysis archive rule.

anchorectl archive rule get ID [flags]

Arguments

ArgumentDescription
IDThe rule id.

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.

archive rule list

List the analysis archive rules.

anchorectl archive rule list [flags]

Flags

FlagTypeEnvironment variableDefaultRequiredDescription
--globalboolANCHORECTL_ARCHIVE_RULE_GLOBALtrueNoInclude system global rules (owned by admin) even for non-admin users.
-o, --outputstringANCHORECTL_FORMATtextNoThe format to show the results. Allowable values: text, json, json-raw, id. See Output Formats.
Last modified September 22, 2026