-
Notifications
You must be signed in to change notification settings - Fork 33
registry delete
Tim Burks edited this page Jan 21, 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 get apis/-/versions/-/specs/-/artifacts
projects/favs/locations/global/apis/translate/versions/v2/specs/discovery@8d1f599c/artifacts/complexity
projects/favs/locations/global/apis/translate/versions/v2/specs/discovery@8d1f599c/artifacts/vocabulary
projects/favs/locations/global/apis/translate/versions/v3/specs/discovery@90388ad2/artifacts/complexity
projects/favs/locations/global/apis/translate/versions/v3/specs/discovery@90388ad2/artifacts/vocabulary
projects/favs/locations/global/apis/translate/versions/v3/specs/google-cloud-translate-v3@ea6773ad/artifacts/complexity
projects/favs/locations/global/apis/translate/versions/v3beta1/specs/discovery@adbacbd6/artifacts/complexity
projects/favs/locations/global/apis/translate/versions/v3beta1/specs/discovery@adbacbd6/artifacts/vocabulary
projects/favs/locations/global/apis/translate/versions/v3beta1/specs/google-cloud-translate-v3beta1@36cc846e/artifacts/complexity
projects/favs/locations/global/apis/wordnik.com/versions/4.0/specs/openapi@e18896ce/artifacts/complexity
projects/favs/locations/global/apis/wordnik.com/versions/4.0/specs/openapi@e18896ce/artifacts/vocabulary
$ 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
$ registry get apis/-/versions/-/specs/-/artifacts
projects/favs/locations/global/apis/translate/versions/v2/specs/discovery@8d1f599c/artifacts/complexity
projects/favs/locations/global/apis/translate/versions/v3/specs/discovery@90388ad2/artifacts/complexity
projects/favs/locations/global/apis/translate/versions/v3/specs/google-cloud-translate-v3@ea6773ad/artifacts/complexity
projects/favs/locations/global/apis/translate/versions/v3beta1/specs/discovery@adbacbd6/artifacts/complexity
projects/favs/locations/global/apis/translate/versions/v3beta1/specs/google-cloud-translate-v3beta1@36cc846e/artifacts/complexity
projects/favs/locations/global/apis/wordnik.com/versions/4.0/specs/openapi@e18896ce/artifacts/complexity