> ## Documentation Index
> Fetch the complete documentation index at: https://help.nops.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Idle GCS Bucket

> Delete, or move to Archive, Cloud Storage buckets that have had no reads, writes or downloads for 60 days.

A Cloud Storage bucket is billed for the data it holds whether or not anyone uses it. nOps finds buckets that have been billed for storage for at least 60 days with no operations, retrievals, downloads or egress at all in that time, and shows their storage cost as the saving from deleting them. If the data must be kept, moving it to the Archive class saves less but still saves.

| | |
| - | - |
| **Cloud** | Google Cloud |
| **Category** | Storage |
| **Service** | Cloud Storage |
| **Action** | Delete |
| **Effort** | Low |
| **Restart needed** | No |
| **Can be rolled back** | No |
| **Analysis window** | Last 60 days |
| **Source** | nOps |

## Why it matters

Buckets left behind by old projects, tests and one-off exports are common and keep billing every month.

## How nOps finds it

nOps reads Cloud Storage billing for each bucket over the last 60 complete days. A bucket is flagged when it was first billed for storage before that window started, was billed in the last 2 days, and had no operation, retrieval, download, egress, transfer, replication or early-deletion charges in the 60 days. The saving is the bucket's storage cost over the last 7 days, scaled to a month, net of discounts and excluding credits, and must be at least \$2 a month. Projects whose spend on the service is at least 90% paid by credits or promotions are left out.

## Before you start

Confirm with the bucket owner that the data is not needed, or decide to keep it in the Archive class.

## How to implement

1. Check the bucket's labels, owner and contents, and whether any application, backup or compliance rule refers to it.
2. If the data must be kept, change the default storage class to Archive and rewrite existing objects, or add a lifecycle rule that moves objects to Archive.
3. Otherwise delete the bucket and its contents: `gcloud storage rm --recursive gs://BUCKET_NAME`.
4. Remove the bucket from Terraform so it is not recreated.

## Risks and considerations

* Deleting a bucket is permanent unless soft delete or object versioning keeps a copy for a while.
* A bucket with a locked retention policy cannot be deleted until its objects reach the end of their retention.
* Archive has a 365-day minimum storage charge and costs more to read, so only use it for data you do not expect to read.

## FAQs

> [accordion] Why does nOps show this with medium confidence?
>
> Billing shows that nobody used the bucket for 60 days, but not whether the data is still needed, for example as a backup.

## Related

* [Move Multi-Region GCS Bucket to a Regional Bucket](https://help.nops.io/inform/supported-recommendations/move-multi-region-gcs-bucket-to-a-regional-bucket)
* Enable Autoclass on Rarely Read GCS Bucket
* [Supported recommendations](https://help.nops.io/inform/supported-recommendations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.