O Container Registry será descontinuado. A partir de 18 de março de 2025, o Container Registry será desativado, e a gravação de imagens nele não estará disponível. Para mais informações sobre a descontinuação do Container Registry e como migrar para o Artifact Registry, consulte Descontinuação do Container Registry.
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Esta página descreve as etapas para desativar o Container Registry.
Como desativar o serviço
A desativação da API Container Registry não exclui imagens de contêiner armazenadas em buckets do Cloud Storage para hosts de registro. Você vai continuar gerando
cobranças de armazenamento e saída de rede
do Cloud Storage para imagens armazenadas.
Clique em Excluir. Uma caixa de diálogo de confirmação vai aparecer.
Para confirmar a exclusão, digite o nome do bucket e clique em Excluir.
gcloud
Se você quiser excluir em massa cem mil ou mais imagens em um bucket,
evite usar a CLI do gcloud, já que o processo de exclusão leva muito
tempo para ser concluído. Use o console Google Cloud para realizar a operação. Para mais informações, consulte
Como excluir objetos do Cloud Storage em massa.
Para excluir um bucket, use o comando gcloud storage rm
com a flag --recursive.
gcloudstoragermgs://BUCKET-NAME--recursive
Substitua BUCKET-NAME pelo nome do bucket de armazenamento do Container Registry. Nos nomes de bucket, PROJECT-ID é o
ID do projeto
Google Cloud.
Se outros Google Cloud serviços estiverem em execução no mesmo Google Cloud
projeto, deixe a API Container Registry ativada. Se você tentar
desativar a API Container Registry.
O Container Registry mostra um aviso se outros serviços com uma dependência
configurada estiverem ativados no projeto. A desativação da API Container Registry
desativa automaticamente todos os serviços no mesmo projeto com uma dependência
configurada, mesmo que você não esteja usando o Container Registry com esses
serviços.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-11 UTC."],[[["\u003cp\u003eDisabling the Container Registry API does not delete container images, and you will continue to incur storage and network charges for stored images.\u003c/p\u003e\n"],["\u003cp\u003eTo disable the API, you can use either the Google Cloud console by navigating to the API Overview page and clicking "Disable API", or use the \u003ccode\u003egcloud services disable containerregistry.googleapis.com\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eIf you no longer need stored images, you should delete the associated Cloud Storage buckets, understanding that doing so permanently deletes all images within them.\u003c/p\u003e\n"],["\u003cp\u003eDeleting storage buckets can be done through the Google Cloud console or via the \u003ccode\u003egcloud storage rm gs://<var>BUCKET-NAME</var> --recursive\u003c/code\u003e command, replacing \u003ccode\u003e<var>BUCKET-NAME</var>\u003c/code\u003e with the corresponding bucket name.\u003c/p\u003e\n"],["\u003cp\u003eIf other services are running on the same project, disabling the Container Registry API will result in other services with configured dependencies being disabled as well, even if you are not currently using Container Registry with those services.\u003c/p\u003e\n"]]],[],null,["# Disable the service\n\nThis page describes the steps to disable Container Registry.\n\nDisabling the service\n---------------------\n\nDisabling the Container Registry API does not delete container images\nstored in Cloud Storage buckets for registry hosts. You will continue to incur\nCloud Storage [storage and network egress charges](/container-registry/pricing)\nfor stored images.\n\nIf you are no longer using Container Registry and do not need the retain\nthe images, [delete the storage buckets](#delete-bucket).\n\n### Disable the API\n\nTo disable the API from the Google Cloud console: \n\n### console\n\n1. Go to the [API Overview](https://console.cloud.google.com/apis/library/containerregistry.googleapis.com) page for Container Registry.\n2. Select the project where the API is enabled.\n3. Click **Manage**.\n4. Click **Disable API**.\n\n### gcloud\n\nRun the following command to disable the API for your current project: \n\n gcloud services disable containerregistry.googleapis.com\n\n### Delete storage buckets\n\nDelete the storage buckets for Container Registry if you are no longer using\nContainer Registry\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.\n\nWhat's next\n-----------\n\n- Configure [access permissions](/container-registry/docs/access-control)"]]