Delete table snapshots

This document describes how to delete a table snapshot by using theGoogle Cloud console, aDROP SNAPSHOT TABLEGoogleSQL statement, abq rm command,or a BigQuery APItables.delete call.It also provides information about how to recover a table snapshot that wasdeleted or that expired in the past seven days.It is intended for users who are familiar withtable snapshots.

Permissions and roles

This section describes theIdentity and Access Management (IAM) permissionthat you need to delete a table snapshot, and thepredefined IAM rolesthat grant those permissions.

Permissions

To delete a table snapshot, you need the following permission:

PermissionResource
bigquery.tables.deleteSnapshotThe table snapshot that you want to delete

Roles

The predefined BigQuery roles that provide the requiredpermissions are as follows:

RoleResource
Any of the following:

bigquery.dataOwner
bigquery.admin
The table snapshot that you want to delete.

Delete a table snapshot

Delete a table snapshot as you would delete a standard table. You don't need todelete a table snapshot that has expired.

You can delete a table snapshot by using one of the following options:

Console

  1. In the Google Cloud console, go to theBigQuery page.

Go to BigQuery

  1. In theExplorer pane, expand the project and dataset nodes of thetable snapshot you want to look at.

  2. Click the name of the table snapshot.

  3. In the snapshot pane that appears, clickDelete.

  4. Confirm, and then clickDelete again.

SQL

Use theDROP SNAPSHOT TABLE DDL statement:

  1. In the Google Cloud console, go to theBigQuery page.

    Go to BigQuery

  2. In the query editor, enter the following statement:

    DROPSNAPSHOTTABLEPROJECT_ID.DATASET_NAME.SNAPSHOT_NAME;

    Replace the following:

    • PROJECT_ID: the project ID of the project that contains the snapshot.
    • DATASET_NAME: the name of the dataset that contains the snapshot.
    • SNAPSHOT_NAME: the name of the snapshot.

  3. ClickRun.

For more information about how to run queries, seeRun an interactive query.

bq

Enter the following command in the Cloud Shell:

Go to Cloud Shell

bqrm\PROJECT_ID:DATASET_NAME.SNAPSHOT_NAME

Replace the following:

  • PROJECT_ID: the project ID of the project that contains the snapshot.
  • DATASET_NAME: the name of the dataset that contains the snapshot.
  • SNAPSHOT_NAME: the name of the snapshot.

API

Call thetables.deletemethod with the following parameters:

ParameterValue
projectIdThe project ID of the project that contains the snapshot.
datasetIdThe name of the dataset that contains the snapshot.
tableIdThe name of the snapshot.

Restore a deleted or expired table snapshot

You can recover a table snapshot that was deleted or that expired inthe past seven days in the same way that you recover a standard table. For moreinformation, seeRestore table snapshots.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-02 UTC.