Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Nesta página, mostramos como excluir uma instância do Filestore.
Excluir uma instância
Antes de excluir uma instância do Filestore, é necessário, antes de tudo, desativá-la
das VMs do cliente. Se não fizer isso, as operações do arquivo deixarão de responder.
Console do Google Cloud
No console Google Cloud , acesse a página "Instâncias do Filestore".
instance-id é o ID da instância do Filestore
que você quer excluir.
project-id é o ID do projeto Google Cloud que
contém a instância do Filestore. É possível ignorar essa
flag se a instância do Filestore estiver no projeto
padrão gcloud. Para definir o projeto padrão, execute o comando config set project:
gcloud config set project project-id
zone é a zona em que a instância do Filestore
reside. Execute o comando gcloud filestore zones list para ver uma lista de zonas compatíveis. Pule essa sinalização
se a instância do Filestore estiver na zona
padrão gcloud. Para definir a zona padrão, execute o comando config set filestore/zone:
gcloud config set filestore/zone zone
--force opcional. Use essa flag com o comando para excluir a
instância do Filestore e todos os snapshots associados.
[[["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-18 UTC."],[[["\u003cp\u003eDeleting a Filestore instance permanently removes all data, which is unrecoverable after deletion.\u003c/p\u003e\n"],["\u003cp\u003eBefore deleting a Filestore instance, it is crucial to unmount it from client VMs to prevent file operations from stopping.\u003c/p\u003e\n"],["\u003cp\u003eYou can delete a Filestore instance using the Google Cloud console, the \u003ccode\u003egcloud\u003c/code\u003e command-line tool, or the REST API, and each method requires specific steps or commands.\u003c/p\u003e\n"],["\u003cp\u003eIf an instance contains snapshots and you want to delete it with \u003ccode\u003egcloud\u003c/code\u003e, you must either delete the snapshots first or include the \u003ccode\u003e--force\u003c/code\u003e flag in the delete command.\u003c/p\u003e\n"],["\u003cp\u003eZonal with a higher capacity range tier instances may take up to 10 minutes to complete the deletion.\u003c/p\u003e\n"]]],[],null,["# Delete instances\n\nThis page shows you how to delete a Filestore instance.\n\nDelete an instance\n------------------\n\n| **Caution:** Deleting a Filestore instance deletes all data on that instance. Once an instance is deleted, the data stored in the instance is not recoverable.\n\nBefore deleting a Filestore instance, unmount it from client VMs\nfirst. Not doing so causes file operations to stop responding. \n\n### Google Cloud console\n\n1. In the Google Cloud console, go to the Filestore Instances page.\n\n [Go to the Filestore instances page](https://console.cloud.google.com/filestore/instances)\n2. Click the Filestore instance ID to open the instance details\n page.\n\n3. Click **Delete** *delete*.\n\n4. When prompted, type the instance ID.\n\n5. Click **Delete**.\n\n### gcloud\n\n#### Before you begin\n\nTo use the gcloud CLI, you must either\n[install the gcloud CLI](/sdk/downloads)\nor use the Cloud Shell\n\nthat's built into the Google Cloud console:\n\n[Go to the Google Cloud console](https://console.cloud.google.com/)\n\nYou can delete a Filestore instance by running the [`instances\ndelete`](/sdk/gcloud/reference/filestore/instances/delete) command: \n\n gcloud filestore instances delete \u003cvar translate=\"no\"\u003einstance-id\u003c/var\u003e \\\n --project=\"\u003cvar translate=\"no\"\u003eproject-id\u003c/var\u003e\" \\\n --zone=\u003cvar translate=\"no\"\u003ezone\u003c/var\u003e\n --force\n\nwhere:\n\n- \u003cvar translate=\"no\"\u003einstance-id\u003c/var\u003e is the instance ID of the Filestore instance you want to delete.\n- \u003cvar translate=\"no\"\u003eproject-id\u003c/var\u003e is the project ID of the Google Cloud project that\n contains the Filestore instance. You can skip this\n flag if the Filestore instance is in the `gcloud` default\n project. You can set the default project by running the [`config set project`](/sdk/gcloud/reference/config/set)\n command:\n\n gcloud config set project \u003cvar translate=\"no\"\u003eproject-id\u003c/var\u003e\n\n- \u003cvar translate=\"no\"\u003ezone\u003c/var\u003e is the zone where the Filestore\n instance resides. Run the `gcloud filestore zones list`\n command to get a list of supported zones. You can skip this flag\n if the Filestore instance is in the `gcloud` default\n zone. You can set the default zone by running the [`config set filestore/zone`](/sdk/gcloud/reference/config/set)\n command:\n\n gcloud config set filestore/zone \u003cvar translate=\"no\"\u003ezone\u003c/var\u003e\n\n- `--force` Optional. Use this flag with the command to delete the\n Filestore instance and any associated snapshots.\n\n### REST API\n\n1. Have gcloud CLI [installed and initialized](/sdk/docs/install), which lets\n you generate an access token for the `Authorization` header.\n\n\n2.\n\n Use [`cURL`](http://curl.haxx.se/) to call the [Filestore API](/filestore/docs/reference/rest/v1/projects.locations.instances/delete): \n\n ```\n curl -s \\\n --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n --header \"Content-Type: application/json\" \\\n --request DELETE \"https://file.googleapis.com/v1/projects/PROJECT/locations/LOCATION/instances/INSTANCE_NAME\"\n ```\n\n Where:\n - \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e is the name of the project where your instance is located. For example, `my-genomics-project`.\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e is the location where your instance resides. For example, `us-west1-a`.\n - \u003cvar translate=\"no\"\u003eINSTANCE_NAME\u003c/var\u003e is the name of the instance you want to delete. For example, `my-genomics-instance`.\n\n[Zonal with a higher capacity range (previously high scale SSD)](/filestore/docs/service-tiers#high_scale_ssd_tier)\ntier instances can take up to 10 minutes to delete, depending on the instance\nsize.\n\nThe Filestore quota is released when instance deletion completes but\nyou are not be billed for the instance during this time.\n\n### Delete instances that have snapshots\n\nIf you want to delete a zonal, regional, or enterprise instance that contains\nsnapshots, you must complete either of the following tasks:\n\n- Delete the instance's snapshots before deleting the instance.\n- Include the `--force` flag in the `gcloud filestore instances delete` command.\n\nThe Google Cloud console allows for the deletion of instances containing\nsnapshots and automatically deletes the snapshots.\n\nWhat's next\n-----------\n\n- [Create a different instance](/filestore/docs/creating-instances).\n- [What is a snapshot?](/filestore/docs/snapshots)\n- [What is a backup?](/filestore/docs/backups)"]]