This page shows you how to delete a Filestore instance.

## Delete an instance

> [!CAUTION]
> **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.

Before deleting a Filestore instance, unmount it from client VMs
first. Not doing so causes file operations to stop responding.

### Google Cloud console

1. In the Google Cloud console, go to the Filestore Instances page.

   [Go to the Filestore instances page](https://console.cloud.google.com/filestore/instances)
2. Click the Filestore instance ID to open the instance details
   page.

3. Click **Delete** .

4. When prompted, type the instance ID.

5. Click **Delete**.

### gcloud

#### Before you begin

To use the gcloud CLI, you must either
[install the gcloud CLI](https://docs.cloud.google.com/sdk/downloads)
or use the Cloud Shell

that's built into the Google Cloud console:

[Go to the Google Cloud console](https://console.cloud.google.com/)

You can delete a Filestore instance by running the [`instances
delete`](https://docs.cloud.google.com/sdk/gcloud/reference/filestore/instances/delete) command:

      gcloud filestore instances delete instance-id \
      --project="project-id" \
      --zone=zone
      --force

where:

- <var translate="no">instance-id</var> is the instance ID of the Filestore instance you want to delete.
- <var translate="no">project-id</var> is the project ID of the Google Cloud project that
  contains the Filestore instance. You can skip this
  flag if the Filestore instance is in the `gcloud` default
  project. You can set the default project by running the [`config set project`](https://docs.cloud.google.com/sdk/gcloud/reference/config/set.md.txt)
  command:

      gcloud config set project project-id

- <var translate="no">zone</var> is the zone where the Filestore
  instance resides. Run the `gcloud filestore zones list`
  command to get a list of supported zones. You can skip this flag
  if the Filestore instance is in the `gcloud` default
  zone. You can set the default zone by running the [`config set filestore/zone`](https://docs.cloud.google.com/sdk/gcloud/reference/config/set.md.txt)
  command:

       gcloud config set filestore/zone zone

- `--force` Optional. Use this flag with the command to delete the
  Filestore instance and any associated snapshots.

### REST API

1. Have gcloud CLI [installed and initialized](https://docs.cloud.google.com/sdk/docs/install), which lets
   you generate an access token for the `Authorization` header.

2. Use [`cURL`](http://curl.haxx.se/) to call the [Filestore API](https://docs.cloud.google.com/filestore/docs/reference/rest/v1/projects.locations.instances/delete.md.txt):

   ```
   curl -s \
     --header "Authorization: Bearer $(gcloud auth print-access-token)" \
     --header "Content-Type: application/json" \
     --request DELETE "https://file.googleapis.com/v1/projects/PROJECT/locations/LOCATION/instances/INSTANCE_NAME"
   ```

   Where:
   - `PROJECT` is the name of the project where your instance is located. For example, `my-genomics-project`.
   - `LOCATION` is the location where your instance resides. For example, `us-west1-a`.
   - `INSTANCE_NAME` is the name of the instance you want to delete. For example, `my-genomics-instance`.

[Zonal with a higher capacity range (previously high scale SSD)](https://docs.cloud.google.com/filestore/docs/service-tiers.md.txt#high_scale_ssd_tier)
tier instances can take up to 10 minutes to delete, depending on the instance
size.

The Filestore quota is released when instance deletion completes but
you are not be billed for the instance during this time.

### Delete instances that have snapshots

If you want to delete a zonal, regional, or enterprise instance that contains
snapshots, you must complete either of the following tasks:

- Delete the instance's snapshots before deleting the instance.
- Include the `--force` flag in the `gcloud filestore instances delete` command.

The Google Cloud console allows for the deletion of instances containing
snapshots and automatically deletes the snapshots.

## What's next

- [Create a different instance](https://docs.cloud.google.com/filestore/docs/creating-instances.md.txt).
- [What is a snapshot?](https://docs.cloud.google.com/filestore/docs/snapshots.md.txt)
- [What is a backup?](https://docs.cloud.google.com/filestore/docs/backups.md.txt)