Skip to content

registry delete

Tim Burks edited this page Feb 14, 2023 · 6 revisions

registry delete allows command-line users to delete contents of a registry.

WARNING: deletes are "hard" deletions. There is no undo.

registry delete PATTERN will delete all resources with names matching PATTERN, but if any of those resources have child resources, their deletion will fail unless the --force (-f) flag is also specified.

For example, the following deletes all of the artifacts with id vocabulary from the currently-configured project:

$ registry delete apis/-/versions/-/specs/-/artifacts/vocabulary
 DEBUG[0000] Deleting projects/favs/locations/global/apis/translate/versions/v2/specs/discovery@8d1f599c/artifacts/vocabulary uid=06df5062
 DEBUG[0000] Deleting projects/favs/locations/global/apis/translate/versions/v3/specs/discovery@90388ad2/artifacts/vocabulary uid=06df5062
 DEBUG[0000] Deleting projects/favs/locations/global/apis/translate/versions/v3beta1/specs/discovery@adbacbd6/artifacts/vocabulary uid=06df5062
 DEBUG[0000] Deleting projects/favs/locations/global/apis/wordnik.com/versions/4.0/specs/openapi@e18896ce/artifacts/vocabulary uid=06df5062