Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Wenn Sie Container Registry nicht mehr verwenden möchten, löschen Sie die verbleibenden Images, indem Sie die Speicher-Buckets für Container Registry löschen.
Wenn die Weiterleitung aktiviert ist, werden durch Befehle zum Löschen von Images in gcr.io-Pfaden Images im entsprechenden Artifact Registry-gcr.io-Repository gelöscht, aber nicht Images, die auf Container Registry-Hosts gespeichert sind.
Wenn Sie alle Container Registry-Images sicher entfernen möchten, löschen Sie die Cloud Storage-Buckets für jeden Container Registry-Hostnamen.
Klicken Sie auf Löschen. Es wird ein Bestätigungsdialogfeld angezeigt.
Geben Sie den Bucketnamen ein und klicken Sie auf Löschen, um den Löschvorgang zu bestätigen.
gcloud
Wenn Sie mehrere Hunderttausend Bilder in einem Bucket im Bulk löschen möchten, sollten Sie die gcloud CLI nicht verwenden, da der Löschvorgang sehr lange dauert. Führen Sie den Vorgang stattdessen über die Google Cloud Console aus. Weitere Informationen finden Sie unter Cloud Storage-Objekte im Bulk-Verfahren löschen.
Verwenden Sie den Befehl gcloud storage rm mit dem Flag --recursive, um einen Bucket zu löschen.
gcloudstoragermgs://BUCKET-NAME--recursive
Ersetzen Sie BUCKET-NAME durch den Namen des Container Registry-Speicher-Buckets. In den Bucket-Namen steht PROJECT-ID für IhreGoogle Cloud
Projekt-ID.
Wenn andere Google Cloud Dienste im selben Google CloudProjekt ausgeführt werden, lassen Sie die Container Registry API aktiviert. Wenn Sie versuchen, die Container Registry API zu deaktivieren
Container Registry zeigt eine Warnung an, wenn andere Dienste mit einer konfigurierten Abhängigkeit im Projekt aktiviert sind. Wenn Sie die Container Registry API deaktivieren, werden alle Dienste im selben Projekt mit einer konfigurierten Abhängigkeit automatisch deaktiviert, auch wenn Sie Container Registry derzeit nicht mit diesen Diensten verwenden.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-18 (UTC)."],[[["\u003cp\u003eTo completely stop using Container Registry, you must delete the Cloud Storage buckets associated with it, as commands in \u003ccode\u003egcr.io\u003c/code\u003e paths will not delete the images stored there.\u003c/p\u003e\n"],["\u003cp\u003eDeleting a Container Registry bucket will permanently remove all images within it, and recovery may not be possible depending on the bucket's settings and how long it has been deleted.\u003c/p\u003e\n"],["\u003cp\u003eTo delete Container Registry buckets, you can use the Google Cloud console or the \u003ccode\u003egcloud storage rm\u003c/code\u003e command with the \u003ccode\u003e--recursive\u003c/code\u003e flag, but avoid using the \u003ccode\u003egcloud CLI\u003c/code\u003e to bulk delete a large number of images.\u003c/p\u003e\n"],["\u003cp\u003eBefore deleting the Cloud Storage buckets, it is recommended to transition to Artifact Registry.\u003c/p\u003e\n"],["\u003cp\u003eDisabling the Container Registry API can impact other services in the same Google Cloud project that are dependent on it, even if you aren't using Container Registry with them.\u003c/p\u003e\n"]]],[],null,["# Clean up images in Container Registry\n\nWhen you are ready to stop using Container Registry, delete the remaining images by deleting the storage buckets for Container Registry.\n\n\u003cbr /\u003e\n\nWhen redirection is enabled, commands to delete images in `gcr.io` paths\ndelete images in the corresponding Artifact Registry gcr.io repository,\nbut they don't delete images stored on Container Registry hosts.\n\nTo safely remove all Container Registry images, delete the Cloud Storage\nbuckets for each Container Registry hostname.\n\nWe recommend you [transition to Artifact Registry](/artifact-registry/docs/transition/auto-migrate-gcr-ar) before\nyou delete your Cloud Storage buckets.\n| **Warning:** Deleting a bucket deletes all images in the bucket. You might not be able to recover images from a deleted bucket, depending on the [bucket's settings](/storage/docs/soft-delete) and the length of time since the bucket was deleted.\n\nTo delete each Container Registry storage bucket: \n\n### Console\n\n1. [Go to the Cloud Storage page in the Google Cloud console](https://console.cloud.google.com/storage).\n2. Select the storage bucket to delete. In the bucket names,\n \u003cvar translate=\"no\"\u003ePROJECT-ID\u003c/var\u003e is your Google Cloud\n [project ID](/resource-manager/docs/creating-managing-projects#identifying_projects).\n\n - gcr.io: `artifacts.`\u003cvar translate=\"no\"\u003ePROJECT-ID\u003c/var\u003e`.appspot.com`\n - asia.gcr.io: `asia.artifacts.`\u003cvar translate=\"no\"\u003ePROJECT-ID\u003c/var\u003e`.appspot.com`\n - eu.gcr.io: `eu.artifacts.`\u003cvar translate=\"no\"\u003ePROJECT-ID\u003c/var\u003e`.appspot.com`\n - us.gcr.io: `us.artifacts.`\u003cvar translate=\"no\"\u003ePROJECT-ID\u003c/var\u003e`.appspot.com`\n3. Click **Delete**. A confirmation dialog box appears.\n\n4. To confirm deletion, enter the bucket name and then click **Delete**.\n\n### gcloud\n\nIf you want to bulk delete a hundred thousand or more images in a bucket,\navoid using the gcloud CLI since the deletion process takes a long\ntime to complete. Use the Google Cloud console to perform the operation\ninstead. For more information, see\n[deleting Cloud Storage objects in bulk](/storage/docs/deleting-objects#delete-objects-in-bulk).\n\nTo delete a bucket, use the [`gcloud storage rm`](/sdk/gcloud/reference/storage/rm)\ncommand with the `--recursive` flag. \n\n gcloud storage rm gs://\u003cvar translate=\"no\"\u003eBUCKET-NAME\u003c/var\u003e --recursive\n\nReplace \u003cvar translate=\"no\"\u003eBUCKET-NAME\u003c/var\u003e with the Container Registry storage\nbucket name. In the bucket names, \u003cvar translate=\"no\"\u003ePROJECT-ID\u003c/var\u003e is your\nGoogle Cloud\n[project ID](/resource-manager/docs/creating-managing-projects#identifying_projects).\n\n- gcr.io: `artifacts.`\u003cvar translate=\"no\"\u003ePROJECT-ID\u003c/var\u003e`.appspot.com`\n- asia.gcr.io: `asia.artifacts.`\u003cvar translate=\"no\"\u003ePROJECT-ID\u003c/var\u003e`.appspot.com`\n- eu.gcr.io: `eu.artifacts.`\u003cvar translate=\"no\"\u003ePROJECT-ID\u003c/var\u003e`.appspot.com`\n- us.gcr.io: `us.artifacts.`\u003cvar translate=\"no\"\u003ePROJECT-ID\u003c/var\u003e`.appspot.com`\n\nThe response looks like the following example: \n\n Removing gs://artifacts.my-project.appspot.com/...\n\nIf other Google Cloud services are running in the same Google Cloud\nproject, leave the Container Registry API enabled. If you try to\n[disable the Container Registry API](/container-registry/docs/enable-service#disable).\nContainer Registry displays a warning if other services with a configured\ndependency are enabled in the project. Disabling the Container Registry API\nautomatically disables any services in the same project with a configured\ndependency, even if you are not currently using Container Registry with those\nservices."]]