Delete table snapshots
This document describes how to delete a table snapshot by using the
Trusted Cloud console, a
DROP SNAPSHOT TABLE
GoogleSQL statement, a
bq rm
command,
or a BigQuery API
tables.delete
call.
It also provides information about how to recover a table snapshot that was
deleted or that expired in the past seven days.
It is intended for users who are familiar with
table snapshots.
Permissions and roles
This section describes the
Identity and Access Management (IAM) permission
that you need to delete a table snapshot, and the
predefined IAM roles
that grant those permissions.
Permissions
To delete a table snapshot, you need the following permission:
Permission |
Resource |
bigquery.tables.deleteSnapshot
|
The table snapshot that you want to delete |
Roles
The predefined BigQuery roles that provide the required
permissions are as follows:
Role |
Resource |
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 to
delete a table snapshot that has expired.
You can delete a table snapshot by using one of the following options:
Console
- In the Trusted Cloud console, go to the BigQuery page.
Go to BigQuery
In the Explorer pane, expand the project and dataset nodes of the
table snapshot you want to look at.
Click the name of the table snapshot.
In the snapshot pane that appears, click Delete.
Confirm, and then click Delete again.
SQL
Use the
DROP SNAPSHOT TABLE
DDL statement:
In the Trusted Cloud console, go to the BigQuery page.
Go to BigQuery
In the query editor, enter the following statement:
DROP SNAPSHOT TABLE 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.
Click play_circle Run.
For more information about how to run queries, see Run an interactive query.
bq
Enter the following command in the Cloud Shell:
Go to Cloud Shell
bq rm \
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 the
tables.delete
method with the following parameters:
Parameter |
Value |
projectId |
The project ID of the project that contains the snapshot. |
datasetId |
The name of the dataset that contains the snapshot. |
tableId |
The name of the snapshot. |
Restore a deleted or expired table snapshot
You can recover a table snapshot that was deleted or that expired in
the past seven days in the same way that you recover a standard table. For more
information, see
Restore table snapshots.
What's next
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-25 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eTable snapshots can be deleted using the Google Cloud console, a \u003ccode\u003eDROP SNAPSHOT TABLE\u003c/code\u003e SQL statement, the \u003ccode\u003ebq rm\u003c/code\u003e command, or a BigQuery API \u003ccode\u003etables.delete\u003c/code\u003e call.\u003c/p\u003e\n"],["\u003cp\u003eTo delete a table snapshot, users need the \u003ccode\u003ebigquery.tables.deleteSnapshot\u003c/code\u003e permission, which is granted by the \u003ccode\u003ebigquery.dataOwner\u003c/code\u003e or \u003ccode\u003ebigquery.admin\u003c/code\u003e roles.\u003c/p\u003e\n"],["\u003cp\u003eDeleting a table snapshot is similar to deleting a standard table, and expired snapshots do not need to be manually deleted.\u003c/p\u003e\n"],["\u003cp\u003eA table snapshot deleted or expired in the past seven days can be recovered in the same way a standard table is recovered.\u003c/p\u003e\n"]]],[],null,["# Delete table snapshots\n======================\n\nThis document describes how to delete a table snapshot by using the\nGoogle Cloud console, a\n[`DROP SNAPSHOT TABLE`](/bigquery/docs/reference/standard-sql/data-definition-language#drop_snapshot_table_statement)\nGoogleSQL statement, a\n[`bq rm`](/bigquery/docs/reference/bq-cli-reference#bq_rm) command,\nor a BigQuery API\n[`tables.delete`](/bigquery/docs/reference/rest/v2/tables/delete) call.\nIt also provides information about how to recover a table snapshot that was\ndeleted or that expired in the past seven days.\nIt is intended for users who are familiar with\n[table snapshots](/bigquery/docs/table-snapshots-intro).\n\nPermissions and roles\n---------------------\n\nThis section describes the\n[Identity and Access Management (IAM) permission](/bigquery/docs/access-control#bq-permissions)\nthat you need to delete a table snapshot, and the\n[predefined IAM roles](/bigquery/docs/access-control#bigquery)\nthat grant those permissions.\n\n### Permissions\n\nTo delete a table snapshot, you need the following permission:\n\n### Roles\n\nThe predefined BigQuery roles that provide the required\npermissions are as follows:\n\nDelete a table snapshot\n-----------------------\n\nDelete a table snapshot as you would delete a standard table. You don't need to\ndelete a table snapshot that has expired.\n\nYou can delete a table snapshot by using one of the following options: \n\n### Console\n\n1. In the Google Cloud console, go to the **BigQuery** page.\n\n[Go to BigQuery](https://console.cloud.google.com/bigquery)\n\n1. In the **Explorer** pane, expand the project and dataset nodes of the\n table snapshot you want to look at.\n\n2. Click the name of the table snapshot.\n\n3. In the snapshot pane that appears, click **Delete**.\n\n4. Confirm, and then click **Delete** again.\n\n### SQL\n\nUse the\n[`DROP SNAPSHOT TABLE` DDL statement](/bigquery/docs/reference/standard-sql/data-definition-language#drop_snapshot_table_statement):\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n1. In the Google Cloud console, go to the **BigQuery** page.\n\n [Go to BigQuery](https://console.cloud.google.com/bigquery)\n2. In the query editor, enter the following statement:\n\n ```googlesql\n DROP SNAPSHOT TABLE PROJECT_ID.DATASET_NAME.SNAPSHOT_NAME;\n ```\n\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID of the project that contains the snapshot.\n - \u003cvar translate=\"no\"\u003eDATASET_NAME\u003c/var\u003e: the name of the dataset that contains the snapshot.\n - \u003cvar translate=\"no\"\u003eSNAPSHOT_NAME\u003c/var\u003e: the name of the snapshot.\n\n \u003cbr /\u003e\n\n3. Click play_circle **Run**.\n\n \u003cbr /\u003e\n\nFor more information about how to run queries, see [Run an interactive query](/bigquery/docs/running-queries#queries).\n\n### bq\n\nEnter the following command in the Cloud Shell:\n\n[Go to Cloud Shell](https://console.cloud.google.com/bigquery?cloudshell=true) \n\n```bash\nbq rm \\\nPROJECT_ID:DATASET_NAME.SNAPSHOT_NAME\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID of the project that contains the snapshot.\n- \u003cvar translate=\"no\"\u003eDATASET_NAME\u003c/var\u003e: the name of the dataset that contains the snapshot.\n- \u003cvar translate=\"no\"\u003eSNAPSHOT_NAME\u003c/var\u003e: the name of the snapshot.\n\n\u003cbr /\u003e\n\n### API\n\nCall the\n[`tables.delete`](/bigquery/docs/reference/rest/v2/tables/delete)\nmethod with the following parameters:\n\nRestore a deleted or expired table snapshot\n-------------------------------------------\n\nYou can recover a table snapshot that was deleted or that expired in\nthe past seven days in the same way that you recover a standard table. For more\ninformation, see\n[Restore table snapshots](/bigquery/docs/table-snapshots-restore).\n\nWhat's next\n-----------\n\n- [Create monthly snapshots of a table by using a service account that runs a scheduled query](/bigquery/docs/table-snapshots-scheduled)."]]